Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 19-Oct-2011 | - | ||||
Base.pm | H A D | 19-Oct-2011 | 1.1 KiB | 84 | 52 | |
Can.pm | H A D | 19-Oct-2011 | 1.7 KiB | 82 | 57 | |
ExtraTests.pm | H A D | 19-Oct-2011 | 2.9 KiB | 115 | 84 | |
Fetch.pm | H A D | 19-Oct-2011 | 2.4 KiB | 94 | 75 | |
Include.pm | H A D | 19-Oct-2011 | 525 | 35 | 25 | |
Makefile.pm | H A D | 19-Oct-2011 | 11.5 KiB | 416 | 320 | |
Metadata.pm | H A D | 19-Oct-2011 | 17.6 KiB | 717 | 586 | |
ReadmeFromPod.pm | H A D | 19-Oct-2011 | 916 | 49 | 35 | |
Repository.pm | H A D | 19-Oct-2011 | 2.2 KiB | 89 | 67 | |
Win32.pm | H A D | 19-Oct-2011 | 1.8 KiB | 65 | 47 | |
WriteAll.pm | H A D | 19-Oct-2011 | 1.2 KiB | 64 | 45 |
ReadmeFromPod.pm
1#line 1 2package Module::Install::ReadmeFromPod; 3 4use 5.006; 5use strict; 6use warnings; 7use base qw(Module::Install::Base); 8use vars qw($VERSION); 9 10$VERSION = '0.12'; 11 12sub readme_from { 13 my $self = shift; 14 return unless $self->is_admin; 15 16 my $file = shift || $self->_all_from 17 or die "Can't determine file to make readme_from"; 18 my $clean = shift; 19 20 print "Writing README from $file\n"; 21 22 require Pod::Text; 23 my $parser = Pod::Text->new(); 24 open README, '> README' or die "$!\n"; 25 $parser->output_fh( *README ); 26 $parser->parse_file( $file ); 27 if ($clean) { 28 $self->clean_files('README'); 29 } 30 return 1; 31} 32 33sub _all_from { 34 my $self = shift; 35 return unless $self->admin->{extensions}; 36 my ($metadata) = grep { 37 ref($_) eq 'Module::Install::Metadata'; 38 } @{$self->admin->{extensions}}; 39 return unless $metadata; 40 return $metadata->{values}{all_from} || ''; 41} 42 43'Readme!'; 44 45__END__ 46 47#line 112 48 49