From 9c03f70819a69618c0fd3c919d0beba8f7fa0da4 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 3 Dec 2007 06:46:33 +0000 Subject: get rid of Cwd for the installer git-svn-id: svn://tug.org/texlive/trunk@5688 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLPOBJ.pm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'Master/tlpkg/TeXLive/TLPOBJ.pm') diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm index 9a73d6bd8da..844a449ef9e 100644 --- a/Master/tlpkg/TeXLive/TLPOBJ.pm +++ b/Master/tlpkg/TeXLive/TLPOBJ.pm @@ -9,7 +9,6 @@ package TeXLive::TLPOBJ; use TeXLive::TLConfig qw($DefaultCategory $CategoriesRegexp $MetaCategoriesRegexp $InfraLocation); use TeXLive::TLUtils; #use File::Path; -use Cwd; use TeXLive::TLTREE; #use FileHandle; # $fh->getline() in from_fh, can we rewritten #use File::Basename; @@ -256,7 +255,10 @@ sub _recompute_size { sub writeout { my $self = shift; my $fd = (@_ ? $_[0] : STDOUT); - format_name $fd "multilineformat"; + # ugly hack to get rid of the FileHandle module, see man perlform + # which is needed for format_name + #format_name $fd "multilineformat"; + select((select($fd),$~ = "multilineformat")[0]); print $fd "name ", $self->name, "\n"; print $fd "category ", $self->category, "\n"; defined($self->{'revision'}) && print $fd "revision $self->{'revision'}\n"; @@ -319,7 +321,10 @@ sub writeout { sub writeout_simple { my $self = shift; my $fd = (@_ ? $_[0] : STDOUT); - format_name $fd "multilineformat"; + # ugly hack to get rid of the FileHandle module, see man perlform + # which is needed for format_name + #format_name $fd "multilineformat"; + select((select($fd),$~ = "multilineformat")[0]); print $fd "name ", $self->name, "\n"; print $fd "category ", $self->category, "\n"; if (defined($self->{'depends'})) { @@ -533,6 +538,8 @@ sub make_container { map { s@^$tltree/@@ ; push @nf, $_; } @files; @files = @nf; } + # load Cwd only if necessary ... + require Cwd; my $cwd = &getcwd; if ("$destdir" !~ m@^/@) { # we have an relative containerdir, so we have to make it absolute -- cgit v1.2.3