[Catalyst-commits] r12019 - in
Catalyst-Runtime/5.80/branches/better_scripts: . lib/Catalyst
lib/Catalyst/Script t/aggregate
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Thu Nov 26 01:02:52 GMT 2009
Author: t0m
Date: 2009-11-26 01:02:52 +0000 (Thu, 26 Nov 2009)
New Revision: 12019
Removed:
Catalyst-Runtime/5.80/branches/better_scripts/TODO.scripts
Modified:
Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/CGI.pm
Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/Create.pm
Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/FastCGI.pm
Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/Server.pm
Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/Test.pm
Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/ScriptRole.pm
Catalyst-Runtime/5.80/branches/better_scripts/t/aggregate/unit_core_script_help.t
Log:
Tidy up help and TODO tests
Deleted: Catalyst-Runtime/5.80/branches/better_scripts/TODO.scripts
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/TODO.scripts 2009-11-26 00:35:31 UTC (rev 12018)
+++ Catalyst-Runtime/5.80/branches/better_scripts/TODO.scripts 2009-11-26 01:02:52 UTC (rev 12019)
@@ -1 +0,0 @@
-* Fix TODO tests
Modified: Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/CGI.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/CGI.pm 2009-11-26 00:35:31 UTC (rev 12018)
+++ Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/CGI.pm 2009-11-26 01:02:52 UTC (rev 12019)
@@ -5,8 +5,6 @@
with 'Catalyst::ScriptRole';
-__PACKAGE__->meta->get_attribute('help')->cmd_aliases('h');
-
__PACKAGE__->meta->make_immutable;
=head1 NAME
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-11-26 00:35:31 UTC (rev 12018)
+++ Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/Create.pm 2009-11-26 01:02:52 UTC (rev 12019)
@@ -5,8 +5,6 @@
with 'Catalyst::ScriptRole';
-__PACKAGE__->meta->get_attribute('help')->cmd_aliases('h');
-
has force => (
traits => [qw(Getopt)],
cmd_aliases => 'nonew',
Modified: Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/FastCGI.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/FastCGI.pm 2009-11-26 00:35:31 UTC (rev 12018)
+++ Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/FastCGI.pm 2009-11-26 01:02:52 UTC (rev 12019)
@@ -7,8 +7,6 @@
with 'Catalyst::ScriptRole';
-__PACKAGE__->meta->get_attribute('help')->cmd_aliases('h');
-
has listen => (
traits => [qw(Getopt)],
cmd_aliases => 'l',
Modified: Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/Server.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/Server.pm 2009-11-26 00:35:31 UTC (rev 12018)
+++ Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/Server.pm 2009-11-26 01:02:52 UTC (rev 12019)
@@ -11,6 +11,8 @@
with 'Catalyst::ScriptRole';
+__PACKAGE__->meta->get_attribute('help')->cmd_aliases('?');
+
has debug => (
traits => [qw(Getopt)],
cmd_aliases => 'd',
Modified: Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/Test.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/Test.pm 2009-11-26 00:35:31 UTC (rev 12018)
+++ Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/Test.pm 2009-11-26 01:02:52 UTC (rev 12019)
@@ -5,8 +5,6 @@
with 'Catalyst::ScriptRole';
-__PACKAGE__->meta->get_attribute('help')->cmd_aliases('h');
-
sub run {
my $self = shift;
Modified: Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/ScriptRole.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/ScriptRole.pm 2009-11-26 00:35:31 UTC (rev 12018)
+++ Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/ScriptRole.pm 2009-11-26 01:02:52 UTC (rev 12019)
@@ -25,6 +25,7 @@
isa => Bool,
is => 'ro',
documentation => q{Display this help and exit},
+ cmd_aliases => ['?', 'h'],
);
sub _getopt_spec_exception {}
Modified: Catalyst-Runtime/5.80/branches/better_scripts/t/aggregate/unit_core_script_help.t
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/t/aggregate/unit_core_script_help.t 2009-11-26 00:35:31 UTC (rev 12018)
+++ Catalyst-Runtime/5.80/branches/better_scripts/t/aggregate/unit_core_script_help.t 2009-11-26 01:02:52 UTC (rev 12019)
@@ -11,26 +11,21 @@
package TestHelpScript;
use Moose;
with 'Catalyst::ScriptRole';
- __PACKAGE__->meta->get_attribute('help')->cmd_aliases('h');
our $help;
- sub _exit_with_usage { $help++ }
+ sub _getopt_full_usage { $help++ }
}
test('-h');
test('--help');
+test('-?');
-TODO: {
- local $TODO = 'This is bork';
- test('-?');
-}
-
sub test {
local $TestHelpScript::help;
local @ARGV = (@_);
lives_ok {
TestHelpScript->new_with_options(application_name => 'TestAppToTestScripts')->run;
- };
- ok $TestHelpScript::help;
+ } 'Lives';
+ ok $TestHelpScript::help, 'Got help';
}
done_testing;
More information about the Catalyst-commits
mailing list