Permalink
Browse files

switch to Module::Load; bump version

  • Loading branch information...
1 parent 8cda0bf commit 01595ee9899785756e260fad555aacbefb97182a @friedo committed Dec 4, 2011
Showing with 5 additions and 9 deletions.
  1. +1 −1 README.pod
  2. +1 −1 dist.ini
  3. +3 −7 lib/Pod/Weaver/Section/Extends.pm
View
@@ -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
View
@@ -4,7 +4,7 @@ license = Perl_5
copyright_holder = Mike Friedman
copyright_year = 2011
-version = 0.005
+version = 0.006
[@Basic]
[AutoPrereqs]
@@ -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';
@@ -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;

0 comments on commit 01595ee

Please sign in to comment.