Skip to content

Commit

Permalink
cleaned up scripts a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 15, 2012
1 parent 01627a2 commit fedb4e5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,6 +1,6 @@
This file documents the revision history for Perl extension Mojolicious.

2.50 2012-02-14 00:00:00
2.50 2012-02-15 00:00:00
- Improved documentation.

2.49 2012-02-13 00:00:00
Expand Down
6 changes: 2 additions & 4 deletions script/hypnotoad
Expand Up @@ -5,6 +5,7 @@ use warnings;

use File::Basename 'dirname';
use File::Spec::Functions 'splitdir';
use Getopt::Long qw/GetOptions :config no_auto_abbrev no_ignore_case/;

push @INC, join('/', splitdir(dirname(__FILE__)), '..', 'lib');
unshift @INC, join('/', splitdir(dirname(__FILE__)), '..', 'lib')
Expand All @@ -17,10 +18,7 @@ Please visit http://mojolicio.us for detailed installation instructions.
EOF

use Getopt::Long qw/GetOptions :config no_auto_abbrev no_ignore_case/;

# "Hey sexy mama, wanna kill all humans?"
my $toad = Mojo::Server::Hypnotoad->new;
my $config = 'hypnotoad.conf';
my $help;
GetOptions(
Expand Down Expand Up @@ -52,7 +50,7 @@ EOF

# "This is it.
# The moment we should've trained for."
$toad->run($app, $config);
Mojo::Server::Hypnotoad->new->run($app, $config);

__END__
Expand Down
5 changes: 2 additions & 3 deletions script/morbo
Expand Up @@ -5,6 +5,7 @@ use warnings;

use File::Basename 'dirname';
use File::Spec::Functions 'splitdir';
use Getopt::Long qw/GetOptions :config no_auto_abbrev no_ignore_case/;

push @INC, join('/', splitdir(dirname(__FILE__)), '..', 'lib');
unshift @INC, join('/', splitdir(dirname(__FILE__)), '..', 'lib')
Expand All @@ -17,13 +18,10 @@ Please visit http://mojolicio.us for detailed installation instructions.
EOF

use Getopt::Long qw/GetOptions :config no_auto_abbrev no_ignore_case/;

# "Welcome to 'Entertainment And Earth Invasion Tonite'.
# Across the galaxy my people are completing the mighty space fleet that
# will exterminate the human race!
# But first, this news from Tinseltown."
my $morbo = Mojo::Server::Morbo->new;
my ($help, @listen, @watch);
GetOptions(
'h|help' => sub { $help = 1 },
Expand Down Expand Up @@ -57,6 +55,7 @@ EOF
# "With Halley's Comet out of ice, Earth is experiencing a sudden case of
# global warming.
# Morbo is pleased but sticky."
my $morbo = Mojo::Server::Morbo->new;
$morbo->listen(\@listen) if @listen;
$morbo->watch(\@watch) if @watch;
$morbo->run($app);
Expand Down

0 comments on commit fedb4e5

Please sign in to comment.