Permalink
Browse files

Implemented starman -v

  • Loading branch information...
1 parent 86e57a3 commit 7ff8e0c2e86157fd41459b34477e19022b3f2ef5 @miyagawa committed Mar 28, 2010
Showing with 7 additions and 2 deletions.
  1. +7 −2 bin/starman
View
@@ -3,11 +3,16 @@ use strict;
use lib "lib";
use Plack::Runner;
+sub version {
+ require Starman;
+ print "Starman $Starman::VERSION\n";
+}
+
my @argv = @ARGV;
-my $runner = Plack::Runner->new(server => 'Starman', env => 'deployment');
+my $runner = Plack::Runner->new(server => 'Starman', env => 'deployment', version_cb => \&version);
$runner->parse_options(@argv);
-$runner->set_options(argv => \@argv) if $runner->can('set_options');
+$runner->set_options(argv => \@argv);
$runner->run;
__END__

0 comments on commit 7ff8e0c

Please sign in to comment.