From: radek Date: Wed, 5 May 2004 17:13:54 +0000 (+0000) Subject: - fixed bug, which could cause providing "perl()" X-Git-Tag: auto/ac/rpm-4_3-0_20040107_18 X-Git-Url: https://git.pld-linux.org/?a=commitdiff_plain;h=refs%2Ftags%2Fauto%2Fth%2Frpm-4_4_6-1_16;p=packages%2Fperl.git - fixed bug, which could cause providing "perl()" Changed files: perl.prov -> 1.10 --- diff --git a/perl.prov b/perl.prov index 21da4a8..a494480 100644 --- a/perl.prov +++ b/perl.prov @@ -31,9 +31,12 @@ use Safe; sub new { my $class = shift; my $self = { - inc => [ sort { length $b cmp length $a } grep m#^/#, @INC ], + inc => [ + sort { length $b cmp length $a } grep m#^/#, + map { y#/#/#s; s#/$##; $_ } @INC + ], provide => {}, - safe => Safe->new, + safe => Safe->new, @_, }; bless $self, $class; @@ -57,7 +60,7 @@ sub process_file { # if the file lives under @INC, we can # obtain the package name from it's path for (@{ $self->{inc} }) { - if ($file =~ m#\Q$_\E/?(.+)$#) { # we can't use ^ here + if ($file =~ m#\Q$_\E/(.+)$#) { # we can't use ^ here $package = $1; if ($package !~ s/\.pm$//) { # it's a *.pl