]>
Commit | Line | Data |
---|---|---|
3765c6cd | 1 | --- rpm-5.1.4/scripts/perl.req 2008-08-20 21:27:09.929116479 +0200 |
2 | +++ rpm-5.1.4/scripts/perl.req 2008-08-20 21:27:25.919114230 +0200 | |
04ff144d | 3 | @@ -196,7 +196,29 @@ |
4 | } | |
5 | } | |
6 | ||
7 | - if ( | |
8 | + # handle "use base qw/ foo::bar baz::blah /;" and variations | |
9 | + if ( | |
10 | + m/^ \s* | |
11 | + use \s+ base | |
cf067bab | 12 | + (?: \s+ q[wq]? \s* ( [!@#\$%^&*'"\/+=`~,.?-] ) \s* ( \S+? (?: \s+\S+? )*? ) \s* \1 |
04ff144d | 13 | + | |
cf067bab | 14 | + \s* ( ["'] ) ( \S+? ) \3 |
04ff144d | 15 | + | |
16 | + # qw[], qw(), qw<>, qw{} are handled here; lax, but who gives | |
cf067bab | 17 | + \s+ q[wq]? \s* [\[({<] \s* ( \S+? (?: \s+\S+? )*? ) \s* [\])}>] |
04ff144d | 18 | + ) |
19 | + \s* ; | |
20 | + /x | |
21 | + ) | |
22 | + { | |
cc68fcc8 | 23 | + my @deps = ( $1 ? split /\s+/, $2 : $3 ? $4 : split /\s+/, $5 ); |
04ff144d | 24 | + for my $mod ( grep !exists $require{$_}, @deps ) { |
25 | + $require{$mod} = ''; | |
26 | + $line{$mod} = $_; | |
27 | + } | |
28 | + } | |
29 | + | |
30 | + elsif ( | |
31 | ||
32 | # ouch could be in a eval, perhaps we do not want these since we catch | |
33 | # an exception they must not be required |