[Catalyst-commits] r10869 - Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Sun Jul 12 17:27:36 GMT 2009


Author: t0m
Date: 2009-07-12 17:27:36 +0000 (Sun, 12 Jul 2009)
New Revision: 10869

Modified:
   Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/Create.pm
Log:
And unfuck so the app name is passed properly

Modified: Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/Create.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/Create.pm	2009-07-12 17:15:09 UTC (rev 10868)
+++ Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/Create.pm	2009-07-12 17:27:36 UTC (rev 10869)
@@ -1,15 +1,17 @@
 package Catalyst::Script::Create;
 use Moose;
-use strict;
-use warnings;
 use Getopt::Long;
 use Pod::Usage;
 use Catalyst::Helper;
+use MooseX::Types::Moose qw/Str/;
+use namespace::autoclean;
 
-sub new_with_options { shift->new }
+has app => (isa => Str, is => 'ro', required => 1);
 
+sub new_with_options { shift->new(@_) }
+
 sub run {
-    my ($appname) = @_;
+    my ($self) = @_;
 my $force = 0;
 my $mech  = 0;
 my $help  = 0;
@@ -24,7 +26,7 @@
 
 my $helper = Catalyst::Helper->new( { '.newfiles' => !$force, mech => $mech } );
 
-pod2usage(1) unless $helper->mk_component( $appname, @ARGV );
+pod2usage(1) unless $helper->mk_component( $self->app, @ARGV );
 
 }
 




More information about the Catalyst-commits mailing list