Questions tagged [catalyst]

Catalyst is a Perl web application framework, similar to Ruby on Rails, Spring (Java), and Maypole.

Catalyst is an elegant web application framework written in the Perl programming language, extremely flexible yet extremely simple. It's similar to Ruby on Rails, Spring (Java), and Maypole, upon which it was originally based. Its most important design philosphy is to provide easy access to all the tools you need to develop web applications, with few restrictions on how you need to use these tools.

http://www.catalystframework.org/

Resources to learn Catalyst:

Useful Links:

524 questions
3
votes
2 answers

Catalyst MVC save multiple objects using a single form

I am using Catalyst Perl MVC framework with HTML::FormHandler as forms processor. Are there any ways to create multiple objects and save them into appropriate separate tables using single form?
romel
  • 97
  • 5
3
votes
2 answers

Retrieve exception message from postgresql function

I have a trigger function on a table that runs on inserts which for certain circumstances will raise an exception. I maintain an old Perl application running on Catalyst that creates a transaction and inserts rows on the table. When the trigger…
rhyek
  • 1,790
  • 1
  • 19
  • 23
3
votes
1 answer

DBIx::Class Temporary column

I am using DBIx::Class and I have a query like this: $groups = $c->model('DB::Project')->search( { "sessions.user_id"=>$c->user->id,done_yn=>'y' }, { select => ["name", "id",\'SUM(UNIX_TIMESTAMP(end_time)-UNIX_TIMESTAMP(start_time)) as…
srchulo
  • 5,143
  • 4
  • 43
  • 72
3
votes
2 answers

catalyst html::formhandler pass form value

I'm using HTML::FormHandler with Catalyst and I have this field: has_field 'client_account_id' => ( type => 'Select', options_method => \&options_account_id); I have 3 tables that are connected with foreign keys: clients client_accounts …
srchulo
  • 5,143
  • 4
  • 43
  • 72
3
votes
2 answers

How can I not send a cookie when I use the Cache-Control header in Catalyst?

I'm using sessions in my Catalyst app via Session, Session::Store::DBIC, and Session::State::Cookie. I have a few controllers and methods that send out data with a Cache-Control: public header, so its essential that the Set-Cookie: header not go out…
derobert
  • 49,731
  • 15
  • 94
  • 124
3
votes
3 answers

Where can I find 'more advanced web toolkit' for Template Toolkit?

I really like Template Toolkit and like how it works with Catalyst, but I would like more 'web advanced' toolkit. It could be just a package of *.tt files for Web objects like these: Selector, Selector_DateTime, Menu, Data_Table... Is there…
sebthebert
  • 12,196
  • 2
  • 26
  • 37
3
votes
1 answer

DBIx::Class Wrapping/overloading a column accessor

Using DBIx::Class I am trying to manipulate the data of a column whenever it is being updated or retrieved. For instance, before it goes into the database I would like to encrypt it, and whenever it is being accessed I would like to decrypt it. I am…
srchulo
  • 5,143
  • 4
  • 43
  • 72
3
votes
1 answer

many-to-many-to-many accessor using DBIx::Class

Using DBIx::Class, I am trying to create a many-to-many accessor (or even just a has-many relationship) that spans two link tables. The three data tables in question are Users, Roles and Pages, with the two link tables UserRoles and RolePages. …
Waz
  • 653
  • 6
  • 12
3
votes
1 answer

why is Catalyst::Helper::View::TTSite deprecated?

I've just started getting into Catalyst, and I've been finding it really helpful. One of my favorite things about it was TTSite in that it got me going fast and gave me something to develop with without just black text (and it required no work from…
srchulo
  • 5,143
  • 4
  • 43
  • 72
2
votes
1 answer

how to update Result folder of Catalyst after change in database

I have created one Catalyst application and I have created Schema and Model using below command perl script/myapp_create.pl model TestDatabase DBIC::Schema MyApp::Schema::TestDatabase create=static dbi:mysql:db After this command, Result directory…
user966588
2
votes
1 answer

Catalyst development server appears to hang

I am doing the usual operation of the inbuilt development server for my Catalyst app: DBIC_TRACE=1 perl script/*_server.pl -d -r -p 3001 2>&1 | tee -a /var/log/cat-dev.log All runs nicely, and the server detects when files change and does a…
jvector
  • 77
  • 1
  • 8
2
votes
1 answer

Catalyst $c->req->params empty?

Trying to Catalyse some prototype pages with form fields. My Catalyst controller does not seem to be getting the inputs from the form when it is submitted. I have tried to reduce the template & controller down as far as I can and I am still getting…
jvector
  • 77
  • 1
  • 8
2
votes
2 answers

I have an ajax request and a test calling a Catalyst controller. How do I get the params to show up in the same place in the Catalyst object?

Snippet from the test: my $request = HTTP::Request->new( POST => 'http://192.168.5.130:3000/user' ); $request->content_type('application/json'); $request->content( $query_string ); my $result = $ua->request( $request ); Snippet from the ajax…
jmcneirney
  • 1,374
  • 8
  • 23
2
votes
2 answers

Best way to save logs/statistics

I use Catalyst (MVC framework for Perl), but the question probably apply to all MVC framework. Until now, I used the Apache log files to get statistics about the visitors: user agent, URL accessed, time, etc. But now that I moved to an MVC…
Julien
  • 5,729
  • 4
  • 37
  • 60
2
votes
2 answers

Testing a method provided by autoload with Test::More

I have a factory class which provides a bunch of similar methods by using autoload. For a longer list of different object types it can do things like Factory->objects(); Factory->object(23); Factory->object(name => "foo"); Now I want to write a…
Daniel Böhmer
  • 14,463
  • 5
  • 36
  • 46