Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

some simple things #1

Merged
merged 6 commits into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 20 additions and 1 deletion.
  1. +2 −0  .gitignore
  2. +13 −1 bin/ppbook
  3. +2 −0  dist.ini
  4. +3 −0  t/base.t
View
2  .gitignore
@@ -0,0 +1,2 @@
+.build
+*.swp
View
14 bin/ppbook
@@ -12,7 +12,8 @@ my %deps =
);
my $app = Pod::PseudoPod::Book->new;
-die "Unknown command (@ARGV)\n" unless $app->plugin_for( $ARGV[0] );
+usage("Missing command") unless @ARGV;
+usage("Unknown command (@ARGV)") unless $app->plugin_for( $ARGV[0] );
my ($cmd, $opt, @args) = $app->get_command(@ARGV);
@@ -22,3 +23,14 @@ for my $command (@{ $deps{$ARGV[0]} }, $cmd)
}
exit;
+
+sub usage
+{
+ my $txt = shift;
+ print "$txt\n" if $txt;
+ print "Available commands:\n";
+ foreach my $cmd (sort keys %deps) {
+ print " $cmd\n";
+ }
+ exit;
+}
View
2  dist.ini
@@ -25,6 +25,8 @@ tag_message = %v ; see Git::Tag
push_to = origin ; see Git::Push
push_to = neworigin
+[AutoPrereqs]
+
[MetaResources]
homepage = https://github.com/chromatic/Pod-PseudoPod-Book
repository.url = https://github.com/chromatic/Pod-PseudoPod-Book.git
View
3  t/base.t
@@ -7,4 +7,7 @@ use warnings;
use_ok 'Pod::PseudoPod::Book'
or exit;
+my $app = Pod::PseudoPod::Book->new;
+isa_ok $app, 'Pod::PseudoPod::Book';
+
done_testing();
Something went wrong with that request. Please try again.