Skip to content

Commit

Permalink
switch to Module::Load; bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
friedo committed Dec 4, 2011
1 parent 8cda0bf commit 01595ee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.pod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Pod::Weaver::Section::Extends - Add a list of parent classes to your POD.

=head1 VERSION

version 0.004
version 0.005

=head1 SYNOPSIS

Expand Down
2 changes: 1 addition & 1 deletion dist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ license = Perl_5
copyright_holder = Mike Friedman
copyright_year = 2011

version = 0.005
version = 0.006

[@Basic]
[AutoPrereqs]
Expand Down
10 changes: 3 additions & 7 deletions lib/Pod/Weaver/Section/Extends.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use warnings;
# ABSTRACT: Add a list of parent classes to your POD.

use Moose;
use Module::Load;
with 'Pod::Weaver::Role::Section';

use aliased 'Pod::Elemental::Element::Nested';
Expand All @@ -18,18 +19,13 @@ sub weave_section {
my $file = $input->{filename};
return unless $file =~ m{^lib/};

# yeah, this is a stupid way to do it. it's only for generating
# docs though. shut up.
my $success = do $file;

die "Could not compile $file to find parent class data: $@ $!"
unless $success;

my $module = $file;
$module =~ s{^lib/}{}; # assume modules live under lib
$module =~ s{/}{::}g;
$module =~ s/\.pm//;

load $module;

my @parents = $self->_get_parents( $module );

return unless @parents;
Expand Down

0 comments on commit 01595ee

Please sign in to comment.