[Catalyst-commits] r7854 - in trunk/CatalystX-Imports/lib/CatalystX: . Imports Imports/Context

rafl at dev.catalyst.perl.org rafl at dev.catalyst.perl.org
Thu May 29 14:00:44 BST 2008


Author: rafl
Date: 2008-05-29 14:00:44 +0100 (Thu, 29 May 2008)
New Revision: 7854

Modified:
   trunk/CatalystX-Imports/lib/CatalystX/Imports.pm
   trunk/CatalystX-Imports/lib/CatalystX/Imports/Context.pm
   trunk/CatalystX-Imports/lib/CatalystX/Imports/Context/Config.pm
   trunk/CatalystX-Imports/lib/CatalystX/Imports/Context/Default.pm
   trunk/CatalystX-Imports/lib/CatalystX/Imports/Vars.pm
Log:
Remove tailing whitespace in various places.


Modified: trunk/CatalystX-Imports/lib/CatalystX/Imports/Context/Config.pm
===================================================================
--- trunk/CatalystX-Imports/lib/CatalystX/Imports/Context/Config.pm	2008-05-29 13:00:22 UTC (rev 7853)
+++ trunk/CatalystX-Imports/lib/CatalystX/Imports/Context/Config.pm	2008-05-29 13:00:44 UTC (rev 7854)
@@ -51,16 +51,16 @@
 
 =head2 Aliasing
 
-To avoid symbol name conflicts, you can pass a hash reference with 
+To avoid symbol name conflicts, you can pass a hash reference with
 "configuration name"/"alias to export" pairs, like this:
 
-  use CatalystX::Imports 
+  use CatalystX::Imports
       Config => { model => 'model_name' };
 
 Often you won't need to alias all of them, but just a few. Fortunately, you
 can mix them:
 
-  use CatalystX::Imports 
+  use CatalystX::Imports
       Config => ['model_order', { model => 'model_name' }];
 
 =cut
@@ -138,7 +138,7 @@
 
 =head1 SEE ALSO
 
-L<Catalyst>, 
+L<Catalyst>,
 L<CatalystX::Imports::Context>,
 L<CatalystX::Imports>
 
@@ -148,7 +148,7 @@
 
 =head1 LICENSE
 
-This program is free software; you can redistribute it and/or modify 
+This program is free software; you can redistribute it and/or modify
 it under the same terms as perl itself.
 
 =cut

Modified: trunk/CatalystX-Imports/lib/CatalystX/Imports/Context/Default.pm
===================================================================
--- trunk/CatalystX-Imports/lib/CatalystX/Imports/Context/Default.pm	2008-05-29 13:00:22 UTC (rev 7853)
+++ trunk/CatalystX-Imports/lib/CatalystX/Imports/Context/Default.pm	2008-05-29 13:00:44 UTC (rev 7854)
@@ -31,7 +31,7 @@
 
 =head1 DESCRIPTION
 
-This package represents the default library of 
+This package represents the default library of
 L<Context|CatalystX::Imports::Context> exports.
 
 =head2 Tags
@@ -107,9 +107,9 @@
     name => 'action',
     code => sub {
         my ($self, $c, $name) = @_[ @Pos{qw( SELF CTX ARGS )} ];
-        return $c->action 
+        return $c->action
             unless $name;
-        return $c->dispatcher->get_action_by_path($name) 
+        return $c->dispatcher->get_action_by_path($name)
             if $name =~ m{^/};
         return $self->action_for($name);
     },
@@ -131,7 +131,7 @@
 
   my $person = $c->model('DBIC::Person')->find(23);
 
-Note, however, that these three exports are aware of the 
+Note, however, that these three exports are aware of the
 L<component_prefix|CatalystX::Imports/component_prefix> configuration
 setting.
 
@@ -141,7 +141,7 @@
     __PACKAGE__->register_export(
         name => $type,
         code => sub {
-            my ($library, $self, $c, $a_args, $name, @args) 
+            my ($library, $self, $c, $a_args, $name, @args)
                 = @_[ @Pos{qw( LIB SELF CTX A_ARGS )}, $Pos{ARGS} .. $#_ ];
 #            my ($library, $self, $c, $a_args, $name) = @_;
             return $library->resolve_component($self, $c, $type, $name, \@args);
@@ -152,7 +152,7 @@
 
 =head2 uri_for
 
-See also L<Catalyst/$c-E<gt>uri_for>. Here is an example in combination 
+See also L<Catalyst/$c-E<gt>uri_for>. Here is an example in combination
 with L</action>:
 
   my $edit_uri = uri_for(action('edit'), 23);
@@ -284,7 +284,7 @@
 
 __PACKAGE__->register_export(
     name  => 'has_param',
-    code  => sub { 
+    code  => sub {
         my ($c, $name) = @_[ @Pos{qw( CTX ARGS )} ];
         return exists $c->request->params->{ $name };
     },
@@ -375,7 +375,7 @@
 
 =head1 SEE ALSO
 
-L<Catalyst>, 
+L<Catalyst>,
 L<CatalystX::Imports::Context>,
 L<CatalystX::Imports>
 
@@ -385,7 +385,7 @@
 
 =head1 LICENSE
 
-This program is free software; you can redistribute it and/or modify 
+This program is free software; you can redistribute it and/or modify
 it under the same terms as perl itself.
 
 =cut

Modified: trunk/CatalystX-Imports/lib/CatalystX/Imports/Context.pm
===================================================================
--- trunk/CatalystX-Imports/lib/CatalystX/Imports/Context.pm	2008-05-29 13:00:22 UTC (rev 7853)
+++ trunk/CatalystX-Imports/lib/CatalystX/Imports/Context.pm	2008-05-29 13:00:44 UTC (rev 7854)
@@ -33,7 +33,7 @@
 
   # Export everything minus the 'captures' function. Also load
   # the additional 'Foo' library and a config value
-  use CatalystX::Imports 
+  use CatalystX::Imports
       Context => {
           Default => [qw( :all -captures +Foo )],
           Config  => [qw( model_name )],
@@ -44,7 +44,7 @@
   }
 
   sub edit: Local {
-      stash( 
+      stash(
           foo      => model(model_name)->find(args->[0]),
           list_uri => uri_for(action('list')),
       );
@@ -76,13 +76,13 @@
 in the default library.
 
 Additionally, it will search and load the C<Foo> library, which would be
-C<CatalystX::Imports::Context::Foo>. This notation doesn't accept any 
+C<CatalystX::Imports::Context::Foo>. This notation doesn't accept any
 arguments, so the library specific default symbols will be exported.
 
 If you just want some specific functions imported, you can also specify
 them explicitly:
 
-  use CatalystX::Imports 
+  use CatalystX::Imports
       Context => [qw(action uri_for model config stash)];
 
 At last, to be specific about more than one library, you can pass a
@@ -137,7 +137,7 @@
       alias     => 'times_two',
       prototype => '$',
       tags      => [qw( math )],
-      code      => sub { 
+      code      => sub {
           my ($library, $ctrl, $ctx, $action_args, @args) = @_;
           return $args[0] * 2;
       },
@@ -152,7 +152,7 @@
 in those tag sets by it's name and aliases. It will be included in the
 C<:all> tag in any case, but only under it's name, not it's aliases.
 
-The specified code reference will get the library class name, the 
+The specified code reference will get the library class name, the
 controller and context objects (like a L<Catalyst> action), and an array
 reference of the arguments passed to the last action and then it's
 own actual arguments passed in. You could call the above with
@@ -195,7 +195,7 @@
         $export_map->{export}{ $name } = {
             name => $name,
             code => $options{code},
-            ( exists $options{prototype} 
+            ( exists $options{prototype}
               ? ( prototype => $options{prototype} )
               : () ),
         };
@@ -212,7 +212,7 @@
 
 =cut
 
-sub _export_map { 
+sub _export_map {
     my ($class) = @_;
     my $map_name = "${class}::${EXPORT_MAP_NAME}";
     {   no strict 'refs';
@@ -223,7 +223,7 @@
 
 =head2 get_export
 
-Expects the name of an export in the library and will return the 
+Expects the name of an export in the library and will return the
 information it stored with it. An export will be stored under its actual
 name as well as its aliases.
 
@@ -287,7 +287,7 @@
 =head2 context_export_into
 
 Takes a target and an actual command set for a library (no C<+Foo> stuff)
-and cleans that (flattens out tags, removes C<-substractions>). It will 
+and cleans that (flattens out tags, removes C<-substractions>). It will
 utilise L</context_install_export_into> to actually export the final set
 of functions.
 
@@ -318,7 +318,7 @@
 
     # remove doubles and substractions
     my %substract_map = map { ($_ => 1) } @{ $substract || [] };
-    @$export_list 
+    @$export_list
       = grep { not exists $substract_map{ $_ } }
         uniq @$export_list;
 
@@ -366,7 +366,7 @@
     # install the export, include prototype if specified
     {   no strict 'refs';
         my $name = $export_info->{name};
-        *{ "${target}::${name}" } 
+        *{ "${target}::${name}" }
           = defined $prototype
             ? set_prototype sub { $export_code->(@_) }, $prototype
             : $export_code;
@@ -383,7 +383,7 @@
 
   use CatalystX::Imports Context => [qw( +Foo )];
 
-will export C<Foo>'s defaults, but 
+will export C<Foo>'s defaults, but
 
   use CatalystX::Imports Context => { Foo => [] };
 
@@ -416,8 +416,8 @@
 =head2 Unknown Context export: 'foo'
 
 You asked for export of the function C<foo>, but no function under this
-name was registered in the library. Please consult your library 
-documentation for a list of available exports. The default library can 
+name was registered in the library. Please consult your library
+documentation for a list of available exports. The default library can
 be found under L<CatalystX::Imports::Context::Default>.
 
 =head1 SEE ALSO
@@ -435,7 +435,7 @@
 
 =head1 LICENSE
 
-This program is free software; you can redistribute it and/or modify 
+This program is free software; you can redistribute it and/or modify
 it under the same terms as perl itself.
 
 =cut

Modified: trunk/CatalystX-Imports/lib/CatalystX/Imports/Vars.pm
===================================================================
--- trunk/CatalystX-Imports/lib/CatalystX/Imports/Vars.pm	2008-05-29 13:00:22 UTC (rev 7853)
+++ trunk/CatalystX-Imports/lib/CatalystX/Imports/Vars.pm	2008-05-29 13:00:44 UTC (rev 7854)
@@ -26,7 +26,7 @@
   use base 'Catalyst::Controller';
 
   # use Vars => 1; for just $self, $ctx and @args
-  use CatalystX::Imports 
+  use CatalystX::Imports
       Vars => { Stash   => [qw( $user $user_rs $template )],
                 Session => [qw( $user_id )] };
 
@@ -84,13 +84,13 @@
     croak 'Either a 1 or a hash reference expected as argument for Vars'
         unless $args and ref $args eq 'HASH';
 
-    # fetch session and 
+    # fetch session and
     my @session = @{ $args->{Session} || [] };
     my @stash   = @{ $args->{Stash}   || [] };
 
-    # build map of symbol hash refs, containing method, type and 
+    # build map of symbol hash refs, containing method, type and
     # sym (name)
-    my @sym =            
+    my @sym =
         map { {method => $_->[0], type => $_->[2], sym => $_->[3]} }
         map { [@$_, $class->_destruct_var_name($_->[1])] }
         map { my $x = $_; map { [$x->[0], $_] } @{ $x->[1] } }
@@ -156,7 +156,7 @@
 
     # initialise exported vars
     no strict 'refs';
-    *$target_name = 
+    *$target_name =
         ( $type eq 'scalar' ? \$$target_name
         : $type eq 'array'  ? \@$target_name
         :                     \%$target_name );
@@ -193,12 +193,12 @@
 
 =head2 Either a 1 or a hash reference expected as argument for Vars
 
-You can import just the default variables ($self, $ctx and @args) by 
+You can import just the default variables ($self, $ctx and @args) by
 specifying a C<1> as a parameter ...
 
   use CatalystX::Imports Vars => 1;
 
-... or you can give it a hash reference and tell it what you want 
+... or you can give it a hash reference and tell it what you want
 additionally ...
 
   use CatalystX::Imports Vars => { Stash => [qw($foo)] };
@@ -217,7 +217,7 @@
 
 =head1 LICENSE
 
-This program is free software; you can redistribute it and/or modify 
+This program is free software; you can redistribute it and/or modify
 it under the same terms as perl itself.
 
 =cut

Modified: trunk/CatalystX-Imports/lib/CatalystX/Imports.pm
===================================================================
--- trunk/CatalystX-Imports/lib/CatalystX/Imports.pm	2008-05-29 13:00:22 UTC (rev 7853)
+++ trunk/CatalystX-Imports/lib/CatalystX/Imports.pm	2008-05-29 13:00:44 UTC (rev 7854)
@@ -9,8 +9,8 @@
 use warnings;
 use strict;
 
-use vars qw( 
-    $VERSION 
+use vars qw(
+    $VERSION
     $STORE_CONTROLLER $STORE_CONTEXT $STORE_ARGUMENTS
     $ACTION_WRAPPER_VAR
 );
@@ -32,7 +32,7 @@
   package MyApp::Controller::User;
   use base 'Catalyst::Controller';
 
-  use CatalystX::Imports 
+  use CatalystX::Imports
       Context => { Default => [qw( :all )],
                    Config  => [{model => 'model_name'}, 'template'] },
       Vars    => { Stash   => [qw( $user $user_rs $template )],
@@ -55,7 +55,7 @@
 
 =head1 DESCRIPTION
 
-This module exports commonly used functionality and shortcuts to 
+This module exports commonly used functionality and shortcuts to
 L<Catalyst>s own feature set into your controller. Currently, these
 groups of exports are available:
 
@@ -63,7 +63,7 @@
 
 See also L<CatalystX::Imports::Context>. This will export functions
 into your namespace that will allow you to access common methods and
-values easier. As an example see the uses of 
+values easier. As an example see the uses of
 L<stash|CatalystX::Imports::Context::Default/stash>,
 L<model|CatalystX::Imports::Context::Default/model> and
 L<args|CatalystX::Imports::Context::Default/args> in the L</SYNOPSIS>.
@@ -109,11 +109,11 @@
 =head2 import
 
 This is a method used by all subclasses. When called, it fetches the
-caller as target (the C<use>ing class) and passes it to the 
+caller as target (the C<use>ing class) and passes it to the
 C<export_into> method that must be implemented by a C<use>able class.
 
 It also makes sure that L</install_action_wrap_into> is called after
-the initial runtime of your controller. 
+the initial runtime of your controller.
 
 =cut
 
@@ -164,10 +164,10 @@
 
 =head2 install_action_wrap_into
 
-This module needs a few parts of data to provide it's functionality. 
-Namely, the current controller and context object, as well as the 
+This module needs a few parts of data to provide it's functionality.
+Namely, the current controller and context object, as well as the
 arguments to the last called action. To get to these, it will simply
-wrap all action code in your controller. This is what this function 
+wrap all action code in your controller. This is what this function
 does, essentially.
 
 =cut
@@ -210,7 +210,7 @@
 
             # store the objects
             {   no strict 'refs';
-                ${ "${target}::CATALYSTX_IMPORTS_STORE_${_}" } 
+                ${ "${target}::CATALYSTX_IMPORTS_STORE_${_}" }
                   = $mapping{ $_ }
                     for keys %mapping;
             }
@@ -248,7 +248,7 @@
 
 =head2 export_into
 
-Tells every specified exporter class (C<Context>, etc.) to export 
+Tells every specified exporter class (C<Context>, etc.) to export
 themselves and passes their respective arguments.
 
 =cut
@@ -294,7 +294,7 @@
 
 =head2 resolve_component
 
-Some functionality will allow you to prefix used components with a 
+Some functionality will allow you to prefix used components with a
 configurable string. They will use this method to find a component
 according to the current configuration.
 
@@ -342,7 +342,7 @@
 
 =head1 SEE ALSO
 
-L<Catalyst>, 
+L<Catalyst>,
 L<CatalystX::Imports::Context>,
 L<CatalystX::Imports::Vars>
 
@@ -352,7 +352,7 @@
 
 =head1 LICENSE
 
-This program is free software; you can redistribute it and/or modify 
+This program is free software; you can redistribute it and/or modify
 it under the same terms as perl itself.
 
 =cut




More information about the Catalyst-commits mailing list