diff options
Diffstat (limited to 'lib/Example/Foobar/list.pm')
-rw-r--r-- | lib/Example/Foobar/list.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Example/Foobar/list.pm b/lib/Example/Foobar/list.pm index 1096c03..f4b02a8 100644 --- a/lib/Example/Foobar/list.pm +++ b/lib/Example/Foobar/list.pm @@ -52,12 +52,13 @@ sub run { foreach my $mod (sort map { my $name = basename($_); - if (exists($INC{File::Spec->catfile($self->classpath, - $name)})) { + my $filename = File::Spec->catfile($self->classpath, + $name); + if (exists($INC{$filename})) { () } else { eval { - require $_; + require $filename; }; $name =~ s/\.pm$//; $@ ? () : [$name, $_]; |