summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLTREE.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/TeXLive/TLTREE.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLTREE.pm24
1 files changed, 14 insertions, 10 deletions
diff --git a/Master/tlpkg/TeXLive/TLTREE.pm b/Master/tlpkg/TeXLive/TLTREE.pm
index 5b67de191d1..95d304b18e7 100644
--- a/Master/tlpkg/TeXLive/TLTREE.pm
+++ b/Master/tlpkg/TeXLive/TLTREE.pm
@@ -7,12 +7,7 @@
package TeXLive::TLTREE;
my $svnrev = '$Revision$';
-my $_modulerevision;
-if ($svnrev =~ m/: ([0-9]+) /) {
- $_modulerevision = $1;
-} else {
- $_modulerevision = "unknown";
-}
+my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
sub module_revision { return $_modulerevision; }
use TeXLive::TLUtils;
@@ -326,11 +321,20 @@ sub get_matching_files {
my $ARCH = $arch;
my $PKGNAME = $pkg;
my $newp;
- eval "\$newp = \"$p\"";
- if (!defined($newp)) {
- print "Huuu: cannot generate newp from p: p=$p, pkg=$pkg, arch=$arch, type=$type\n";
+ {
+ my $warnstr = "";
+ local $SIG{__WARN__} = sub { $warnstr = $_[0]; };
+ eval "\$newp = \"$p\"";
+ if (!defined($newp)) {
+ die "cannot set newp from p: p=$p, pkg=$pkg, arch=$arch, type=$type";
+ }
+ if ($warnstr) {
+ tlwarn("Warning `$warnstr' while evaluating: $p "
+ . "(pkg=$pkg, arch=$arch, type=$type), returning empty list\n");
+ return ();
+ }
}
- return($self->_get_matching_files($type,$newp));
+ return $self->_get_matching_files($type,$newp);
}