From: Tatsuhiko Miyagawa Date: Thu, 25 Mar 2010 09:23:23 +0000 (-0700) Subject: slightly better user experience :) X-Git-Tag: v0.9.4~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3e4dadce0f09054d985028066c0690951e45237b;hp=a884f0d7e02a1241b6816e0b4fc609090083a3f7;p=p5sagit%2FApp-FatPacker.git slightly better user experience :) --- diff --git a/lib/App/FatPacker.pm b/lib/App/FatPacker.pm index b0dc9c9..e8750ec 100644 --- a/lib/App/FatPacker.pm +++ b/lib/App/FatPacker.pm @@ -47,7 +47,7 @@ sub new { bless({}, $_[0]) } sub run_script { my ($self, $args) = @_; my @args = $args ? @$args : @ARGV; - (my $cmd = shift @args) =~ s/-/_/g; + (my $cmd = shift @args || 'help') =~ s/-/_/g; if (my $meth = $self->can("script_command_${cmd}")) { $self->$meth(\@args); } else { @@ -55,6 +55,10 @@ sub run_script { } } +sub script_command_help { + print "Try `perldoc fatpack` for how to use me\n"; +} + sub script_command_trace { my ($self, $args) = @_;