-d and --debug work for me
Devin Austin [Wed, 15 Jul 2009 21:41:11 +0000 (21:41 +0000)]
lib/Catalyst/Script/Server.pm
t/TestApp/lib/TestApp.pm
t/TestApp/lib/TestApp/Controller/Root.pm
t/TestApp/script/testapp_create.pl

index 619177d..0e5054f 100644 (file)
@@ -11,7 +11,6 @@ use lib "$Bin/../lib";
 use Pod::Usage;
 use Moose;
 use Catalyst::Restarter;
-#use Catalyst::Engine::HTTP;
 use namespace::autoclean;
 
 with 'MooseX::Getopt';
@@ -142,10 +141,9 @@ sub usage {
 
 }
 
-my @argv = @ARGV;
 
 sub run {
-    my $self = shift;
+    my ($self) = shift;
 
     $self->usage if $self->help;
 
@@ -182,7 +180,7 @@ sub run {
         my $restarter = $subclass->new(
             %args,
             start_sub => sub { $self->_run },
-            argv      => $self->ARGV,
+            argv      => \$self->ARGV,
         );
 
         $restarter->run_and_watch;
index fc3bb88..5dd463a 100644 (file)
@@ -14,7 +14,7 @@ use Catalyst::Runtime 5.80;
 #                 directory
 
 use parent qw/Catalyst/;
-use Catalyst qw/-Debug
+use Catalyst qw/
                 ConfigLoader
                 Static::Simple/;
 our $VERSION = '0.01';
index 0b3a3b4..bf6e1f4 100644 (file)
@@ -42,7 +42,7 @@ sub default :Path {
 sub test : Local {
   my ($self, $c) = @_;
   
-  $c->res->body("herro!!");
+  $c->res->body("herro!");
 }
 
 =head2 end
index 8d6a4d2..16922aa 100755 (executable)
@@ -1,38 +1,12 @@
 #!/usr/bin/env perl
 
-use strict;
-use warnings;
-use Getopt::Long;
-use Pod::Usage;
-eval "use Catalyst::Helper;";
-
-if ($@) {
-  die <<END;
-To use the Catalyst development tools including catalyst.pl and the
-generated script/myapp_create.pl you need Catalyst::Helper, which is
-part of the Catalyst-Devel distribution. Please install this via a
-vendor package or by running one of -
-
-  perl -MCPAN -e 'install Catalyst::Devel'
-  perl -MCPANPLUS -e 'install Catalyst::Devel'
-END
-}
-
-my $force = 0;
-my $mech  = 0;
-my $help  = 0;
-
-GetOptions(
-    'nonew|force'    => \$force,
-    'mech|mechanize' => \$mech,
-    'help|?'         => \$help
- );
-
-pod2usage(1) if ( $help || !$ARGV[0] );
-
-my $helper = Catalyst::Helper->new( { '.newfiles' => !$force, mech => $mech } );
-
-pod2usage(1) unless $helper->mk_component( 'TestApp', @ARGV );
+use FindBin qw/$Bin/;
+
+## because this is a test
+use lib "$Bin/../../../lib";
+use Catalyst::ScriptRunner;
+Catalyst::ScriptRunner->run('TestApp','Create');
+
 
 1;