Extract perl dependecies from "use parent qw(Foo)".

parent is a successor to base, with similar functionality.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
This commit is contained in:
Ville Skyttä 2011-04-06 20:56:31 +03:00 committed by Panu Matilainen
parent 6331fec6e4
commit 2511b09679
1 changed files with 2 additions and 2 deletions

View File

@ -261,8 +261,8 @@ sub process_file {
($module =~ m/\.ph$/) && next; ($module =~ m/\.ph$/) && next;
# use base qw(Foo) dependencies # use base|parent qw(Foo) dependencies
if ($statement eq "use" && $module eq "base") { if ($statement eq "use" && ($module eq "base" || $module eq "parent")) {
add_require($module, undef); add_require($module, undef);
if ($version =~ /^qw\s*[(\/'"]\s*([^)\/"']+?)\s*[)\/"']/) { if ($version =~ /^qw\s*[(\/'"]\s*([^)\/"']+?)\s*[)\/"']/) {
add_require($_, undef) for split(' ', $1); add_require($_, undef) for split(' ', $1);