[Catalyst] default action arguments

Jeff Bisbee catalyst at jbisbee.com
Sun Jul 17 22:47:10 CEST 2005


Just curious why the path is prepended to the list of arguments to
default.  It caught me by surprise and was wondering if there was a good
reason for it, backward compatibility, or just some pattern that makes 
good use of it.

    package MyApp::C::Company::Test;
    use strict;
    use base 'Catalyst::Base';

    sub default : Private {
	my ($self, $c, $arg1, $arg2, $arg3) = @_
    }

    sub list : Local {
	my ($self, $c, $arg1) = @_;
    }

If its not clear above, why is ($arg1, $arg2) = ('company','test') and
why not the first argument off of PATH_INFO?

-- Jeff Bisbee / catalyst at jbisbee.com / jbisbee.com



More information about the Catalyst mailing list