Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

move Carton.pod to lib

  • Loading branch information...
commit 1958242de2d9554e80c6eec1eaf824c333d42e23 1 parent 8702b59
@miyagawa miyagawa authored
View
2  MANIFEST
@@ -17,8 +17,8 @@ inc/Module/Install/Scripts.pm
inc/Module/Install/Win32.pm
inc/Module/Install/WriteAll.pm
lib/Carton.pm
+lib/Carton.pod
lib/Carton/CLI.pm
-lib/Carton/Doc/Carton.pod
lib/Carton/Doc/FAQ.pod
lib/Carton/Doc/Install.pod
lib/Carton/Doc/List.pod
View
24 Makefile.PL
@@ -2,8 +2,8 @@ use inc::Module::Install;
name 'carton';
version_from 'lib/Carton.pm';
perl_version '5.008001';
-license_from 'lib/Carton/Doc/Carton.pod';
-readme_from('lib/Carton/Doc/Carton.pod');
+license_from 'lib/Carton.pod';
+readme_from('lib/Carton.pod');
requires 'version', 0.77;
requires 'JSON';
@@ -26,14 +26,15 @@ sub doc_to_pods {
my %pods;
- for my $file (glob "lib/Carton/Doc/*.pod") {
- my $base = ($file =~ m!Doc/(.*?)\.pod!)[0];
- my $name = $base eq 'Carton' ? "carton" : ("carton-" . lc($base));
+ for my $file ("lib/Carton.pod", glob "lib/Carton/Doc/*.pod") {
+ my $base = ($file =~ m!lib/(.*?)\.pod!)[0];
+ $base =~ s!/!::!g;
+ my $name = $base eq 'Carton' ? "carton" : ("carton-" . lc( (split /::/, $base)[-1] ));
my $doc = "doc/$name.pod";
if ($Module::Install::AUTHOR) {
mkdir "doc", 0777;
- copy_pod($file, $doc, "Carton::Doc::$base" => $name);
+ copy_pod($file, $doc, $base => $name);
}
$pods{$doc} = "blib/man1/$name.1"
@@ -49,16 +50,19 @@ sub copy_pod {
warn "Copying $src -> $dest\n";
- open my $in, "<", $src or die $!;
- open my $out, ">", $dest or die $!;
+ open my $in, "<", $src or die "$src: $!";
+ open my $out, ">", $dest or die "$dest: $!";
my $match;
while (<$in>) {
- s/^$pod_name - /$man - / and $match++;
+ unless ($match) {
+ s/^$pod_name - /$man - /
+ and $match++;
+ }
print $out $_;
}
unless ($match) {
- die "Could nto find NAME $pod_name in $src";
+ die "Couldn't find NAME $pod_name in $src";
}
}
View
3  README
@@ -1,6 +1,5 @@
NAME
- Carton::Doc::Carton - Perl module dependency manager (aka Bundler for
- Perl)
+ Carton - Perl module dependency manager (aka Bundler for Perl)
SYNOPSIS
# During the development
View
1  TODO
@@ -9,6 +9,7 @@ exec
unit tests
carton bundle
self-contained cpanm and carton
+support lowest possible perl version (to change CoreList in cpanm dict)
# 1.2
Support DarkPAN/github etc
View
2  lib/Carton/Doc/Carton.pod → lib/Carton.pod
@@ -1,6 +1,6 @@
=head1 NAME
-Carton::Doc::Carton - Perl module dependency manager (aka Bundler for Perl)
+Carton - Perl module dependency manager (aka Bundler for Perl)
=head1 SYNOPSIS
View
2  lib/Carton/CLI.pm
@@ -111,7 +111,7 @@ sub error {
sub cmd_help {
my $self = shift;
- my $module = "Carton::Doc::" . ($_[0] ? ucfirst $_[0] : "Carton");
+ my $module = $_[0] ? ("Carton::Doc::" . ucfirst $_[0]) : "Carton";
system "perldoc", $module;
}
Please sign in to comment.
Something went wrong with that request. Please try again.