[Catalyst] Catalyst $c->request->params

Lukas Thiemeier spamcatcher at thiemeier.net
Sat Jun 1 15:36:02 GMT 2013

On 06/01/2013 02:32 PM, 疾驰者 wrote:
> Dear friends: 
>     I read and follow http://www.catalystframework.org/calendar/2012/8
> article, These code
> -------------------------------------------------------
>  $c->request->params
> -------------------------------------------------------
> in controller Manage.pm, and
> --------------------------------------------------------
> write_file $database_file, { append => 1 },
>       "$id|$params->{first_name}|$params->{last_name}|$params->{email}\n";
> ----------------------------------------------------------
> in model DB.pm, 'first_name' and 'last_name' can't get from
> database_file.txt and  two pm file.
>    What's the principle?
>    $c is so import and complex, how can I get it from formal pod
> document or some special article such as
> http://www.catalystframework.org/calendar/2012/8?
>   Thanks a lot.
> Thai Heng


The Article you are referring to uses File::Slurp to create a File based
Model. If you are looking for read_file, edit_file_lines or write_file,
you have to take a look at File::Slurp. This is not really Catalyst
related. I think File::Slurp is explained in the fist part of the 9 Step
Tutorial. Did you read that?

The Author mentioned somewhere that his articles are not a replacement
for the Catalyst Docs:

$c is documented in Catalyst.pm. I guess you are looking for the
"METHODS" section:


Catalyst.pm also contains links to almost all related components, like
Catalyst::Request and Catalyst::Model.

Another good starting point for learning Catalyst is


I think it is not completely up to date, but it will help you to
understand how Catalyst works and how to use it.

cheers, Lukas

> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/

More information about the Catalyst mailing list