From: Dan Dascalescu Date: Tue, 19 May 2009 23:36:15 +0000 (+0000) Subject: Fixed "its" vs "it's" X-Git-Tag: 5.80005~37 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=43c581537432e9e6dd82d10375e1aac4cbcff5fb Fixed "its" vs "it's" --- diff --git a/Changes b/Changes index de92004..a917b78 100644 --- a/Changes +++ b/Changes @@ -852,7 +852,7 @@ - helpers now create .new files where files already exist and differ - fixed $Data::Dumper::Terse (Robin Berjon) - added arguments for detach - - new credits section in pod + - new credits section in POD - fixed detach to allow relative action names (Matt and Robert) - added the ability to have whitespaces in Path( '' ) and Regex( '' ) diff --git a/lib/Catalyst/Action.pm b/lib/Catalyst/Action.pm index b96bfbc..f77c08c 100644 --- a/lib/Catalyst/Action.pm +++ b/lib/Catalyst/Action.pm @@ -10,7 +10,7 @@ Catalyst::Action - Catalyst Action =head1 DESCRIPTION -This class represents a Catalyst Action. You can access the object for the +This class represents a Catalyst Action. You can access the object for the currently dispatched action via $c->action. See the L for more information on how actions are dispatched. Actions are defined in L subclasses. @@ -62,7 +62,7 @@ sub execute { sub match { my ( $self, $c ) = @_; #would it be unreasonable to store the number of arguments - #the action has as it's own attribute? + #the action has as its own attribute? #it would basically eliminate the code below. ehhh. small fish return 1 unless exists $self->attributes->{Args}; my $args = $self->attributes->{Args}[0]; diff --git a/lib/Catalyst/Component.pm b/lib/Catalyst/Component.pm index 2782252..be0d758 100644 --- a/lib/Catalyst/Component.pm +++ b/lib/Catalyst/Component.pm @@ -34,7 +34,7 @@ Catalyst::Component - Catalyst Component Base Class my ( $self, $c ) = @_; $c->response->output( $self->{foo} ); } - + 1; # Methods can be a request step @@ -47,7 +47,7 @@ Catalyst::Component - Catalyst Component Base Class =head1 DESCRIPTION -This is the universal base class for Catalyst components +This is the universal base class for Catalyst components (Model/View/Controller). It provides you with a generic new() for instantiation through Catalyst's @@ -60,12 +60,12 @@ __PACKAGE__->mk_classdata('_config'); sub BUILDARGS { my ($self) = @_; - + # Temporary fix, some components does not pass context to constructor my $arguments = ( ref( $_[-1] ) eq 'HASH' ) ? $_[-1] : {}; my $args = $self->merge_config_hashes( $self->config, $arguments ); - + return $args; } @@ -140,8 +140,8 @@ If this method is present (as it is on all Catalyst::Component subclasses, it is called by Catalyst during setup_components with the application class as $c and any config entry on the application for this component (for example, in the case of MyApp::Controller::Foo this would be -MyApp->config->{'Controller::Foo'}). The arguments are expected to be a -hashref and are merged with the __PACKAGE__->config hashref before calling +MyApp->config->{'Controller::Foo'}). The arguments are expected to be a +hashref and are merged with the __PACKAGE__->config hashref before calling ->new to instantiate the component. =head2 $c->config @@ -150,15 +150,15 @@ hashref and are merged with the __PACKAGE__->config hashref before calling =head2 $c->config($key, $value, ...) -Accessor for this component's config hash. Config values can be set as +Accessor for this component's config hash. Config values can be set as key value pair, or you can specify a hashref. In either case the keys -will be merged with any existing config settings. Each component in -a Catalyst application has it's own config hash. +will be merged with any existing config settings. Each component in +a Catalyst application has its own config hash. =head2 $c->process() This is the default method called on a Catalyst component in the dispatcher. -For instance, Views implement this action to render the response body +For instance, Views implement this action to render the response body when you forward to them. The default is an abstract method. =head2 $c->merge_config_hashes( $hashref, $hashref ) diff --git a/t/aggregate/live_engine_response_headers.t b/t/aggregate/live_engine_response_headers.t index 0d373c2..123b125 100644 --- a/t/aggregate/live_engine_response_headers.t +++ b/t/aggregate/live_engine_response_headers.t @@ -42,7 +42,7 @@ foreach my $method qw(HEAD GET) { # method name is echo'd back in content-body, which # accounts for difference in content length. In normal # cases the Content-Length should be the same regardless - # of if its a GET or HEAD request. + # of whether it's a GET or HEAD request. SKIP: { if ( $ENV{CATALYST_SERVER} ) { diff --git a/t/unit_controller_config.t b/t/unit_controller_config.t index d99471c..397882c 100755 --- a/t/unit_controller_config.t +++ b/t/unit_controller_config.t @@ -34,11 +34,11 @@ use_ok('Catalyst'); package controller_a; use base 'base_controller'; - + __PACKAGE__->config( key_a => 'value_a' ); } - - + + { package controller_b; @@ -55,26 +55,26 @@ use_ok('Catalyst'); ## ---------------------------------------------------------------------------- ## THE TESTS. Basically we first check to make sure that all the children of ## the base_controller properly inherit the {base_key => 'base_value'} info -## and that each of the children also has it's local config data and that none +## and that each of the children also has its local config data and that none ## of the classes have data that is unexpected. ## ---------------------------------------------------------------------------- # First round, does everything have what we expect to find? If these tests fail there is something -# wrong with the way config is storing it's information. +# wrong with the way config is storing its information. ok( base_controller->config->{base_key} eq 'base_value', 'base_controller has expected config value for "base_key"') or diag('"base_key" defined as "'.base_controller->config->{base_key}.'" and not "base_value" in config'); ok( controller_a->config->{base_key} eq 'base_value', 'controller_a has expected config value for "base_key"') or diag('"base_key" defined as "'.controller_a->config->{base_key}.'" and not "base_value" in config'); - + ok( controller_a->config->{key_a} eq 'value_a', 'controller_a has expected config value for "key_a"') or diag('"key_a" defined as "'.controller_a->config->{key_a}.'" and not "value_a" in config'); ok( controller_b->config->{base_key} eq 'base_value', 'controller_b has expected config value for "base_key"') or diag('"base_key" defined as "'.controller_b->config->{base_key}.'" and not "base_value" in config'); - + ok( controller_b->config->{key_b} eq 'value_b', 'controller_b has expected config value for "key_b"') or diag('"key_b" defined as "'.controller_b->config->{key_b}.'" and not "value_b" in config'); @@ -83,9 +83,9 @@ ok( controller_b->config->{key_b} eq 'value_b', 'controller_b has expected confi ok( scalar(keys %{base_controller->config}) == 1, 'base_controller has the expected number of config values') or diag("base_controller should have 1 config value, but it has ".scalar(keys %{base_controller->config})); - + ok( scalar(keys %{controller_a->config}) == 2, 'controller_a has the expected number of config values') or diag("controller_a should have 2 config value, but it has ".scalar(keys %{base_controller->config})); - + ok( scalar(keys %{controller_b->config}) == 2, 'controller_b has the expected number of config values') or diag("controller_a should have 2 config value, but it has ".scalar(keys %{base_controller->config})); diff --git a/t/unit_utils_subdir.t b/t/unit_utils_subdir.t index 852d2d4..8a78655 100644 --- a/t/unit_utils_subdir.t +++ b/t/unit_utils_subdir.t @@ -4,7 +4,7 @@ use strict; use warnings; # simulates an entire testapp rooted at t/something -# except without bothering creating it since its +# except without bothering creating it since it's # only the -e check on the Makefile.PL that matters BEGIN { use_ok 'Catalyst::Utils' } @@ -14,21 +14,21 @@ use Path::Class::Dir; { $INC{'TestApp.pm'} = "$FindBin::Bin/something/script/foo/../../lib/TestApp.pm"; my $home = Catalyst::Utils::home('TestApp'); - like($home, qr{t[\/\\]something}, "has path TestApp/t/something"); + like($home, qr{t[\/\\]something}, "has path TestApp/t/something"); unlike($home, qr{[\/\\]script[\/\\]foo}, "doesn't have path /script/foo"); } { $INC{'TestApp.pm'} = "$FindBin::Bin/something/script/foo/bar/../../../lib/TestApp.pm"; my $home = Catalyst::Utils::home('TestApp'); - like($home, qr{t[\/\\]something}, "has path TestApp/t/something"); + like($home, qr{t[\/\\]something}, "has path TestApp/t/something"); unlike($home, qr{[\/\\]script[\/\\]foo[\/\\]bar}, "doesn't have path /script/foo/bar"); } { $INC{'TestApp.pm'} = "$FindBin::Bin/something/script/../lib/TestApp.pm"; my $home = Catalyst::Utils::home('TestApp'); - like($home, qr{t[\/\\]something}, "has path TestApp/t/something"); + like($home, qr{t[\/\\]something}, "has path TestApp/t/something"); unlike($home, qr{[\/\\]script[\/\\]foo}, "doesn't have path /script/foo"); } @@ -36,7 +36,7 @@ use Path::Class::Dir; $INC{'TestApp.pm'} = "TestApp.pm"; my $dir = "$FindBin::Bin/something"; chdir( $dir ); - + my $home = Catalyst::Utils::home('TestApp'); $dir = Path::Class::Dir->new( $dir );