Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

33 lines (27 sloc) 0.931 kb
name 'bundle';
description 'Support scanning dependencies from Bundle:: modules';
author 'Tatsuhiko Miyagawa';
api_version 0.1;
hook find_deps => sub {
my $args = shift;
if ($args->{module} =~ m!^Bundle::!) {
my @module = split /::/, $args->{module};
my $base = $module[-1] . ".pm";
my $lib = join("/", "lib", @module) . ".pm";
for my $file (grep -e, ($base, $lib)) {
$self->chat("Scanning $file for bundle dependencies...");
open my $pod, "<$file" or next;
my $in_contents;
while (<$pod>) {
if (/^=head\d\s+CONTENTS/) {
$in_contents = 1;
} elsif (/^=/) {
$in_contents = 0;
} elsif ($in_contents) {
/^([\w:]+)/
and $args->{deps}->{$1} ||= 0;
}
}
}
}
};
Jump to Line
Something went wrong with that request. Please try again.