]>
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 | |
12 | + (?: \s+ q[wq]? \s* ( [!@#\$%^&*'"\/+=`~,.?-] ) \s* ( \S+? (?: \s+\S+ )* ) \s* \1 | |
13 | + | | |
14 | + \s* ( ["'] ) ( \S+ ) \3 | |
15 | + | | |
16 | + # qw[], qw(), qw<>, qw{} are handled here; lax, but who gives | |
17 | + \s+ q[wq]? \s* [\[({<] \s* ( \S+? (?: \s+\S+ )* ) \s* [\])}>] | |
18 | + ) | |
19 | + \s* ; | |
20 | + /x | |
21 | + ) | |
22 | + { | |
23 | + my @deps = ( $1 ? split /\s+/, $2 : $3 ? split /\s+/, $4 : $5 ); | |
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 |