[Catalyst] Re: A very strange question,please help me
Everything looks ok when after upgrade.Thanks very much. 2007/4/9, Cookie [EMAIL PROTECTED]: the same code(example in CPAN) when I run the program(login part,post username and password to server) in the windows,it can normally show to me,but when I run the program in a Linux server,the form will post to the server twice.It's very odd.I don't know where the reason is?Please help me. [debug] Debug messages enabled [debug] Loaded plugins: .. | Catalyst::Plugin::Authentication 0.09 | | Catalyst::Plugin::Authentication::Credential::Password | | Catalyst::Plugin::Authentication::Store::DBIC 0.07 | | Catalyst::Plugin::Authorization::ACL 0.08 | | Catalyst::Plugin::Authorization::Roles 0.05 | | Catalyst::Plugin::ConfigLoader 0.13 | | Catalyst::Plugin::HTML::Widget 1.1 | | Catalyst::Plugin::Session 0.14 | | Catalyst::Plugin::Session::State::Cookie 0.06 | | Catalyst::Plugin::Session::Store::FastMmap 0.02 | | Catalyst::Plugin::StackTrace 0.06 | | Catalyst::Plugin::Static::Simple 0.15 | '' [debug] Loaded dispatcher Catalyst::Dispatcher [debug] Loaded engine Catalyst::Engine::HTTP [debug] Found home /home/nwr748/bin/MyApp [debug] Loaded Config /home/nwr748/bin/MyApp/myapp.yml [debug] Loaded components: .-+--. | Class | Type | +-+--+ | MyApp::Controller::Books| instance | | MyApp::Controller::Login| instance | | MyApp::Controller::Logout | instance | | MyApp::Controller::Root | instance | | MyApp::Model::MyAppDB | instance | | MyApp::Model::MyAppDB::Author | class| | MyApp::Model::MyAppDB::Book | class| | MyApp::Model::MyAppDB::BookAuthor | class| | MyApp::Model::MyAppDB::Role | class| | MyApp::Model::MyAppDB::User | class| | MyApp::Model::MyAppDB::UserRole | class| | MyApp::View::TT | instance | '-+--' [debug] Loaded Private actions: .--+--+--. | Private | Class| Method | +--+--+--+ | /default | MyApp::Controller::Root | default | | /end | MyApp::Controller::Root | end | | /auto| MyApp::Controller::Root | auto | | /logout/index| MyApp::Controller::Logout| index| | /login/index | MyApp::Controller::Login | index| | /books/url_create| MyApp::Controller::Books | url_create | | /books/form_create_- | MyApp::Controller::Books | form_create- | | do | | _do | | /books/hw_create | MyApp::Controller::Books | hw_create| | /books/access_denied | MyApp::Controller::Books | access_deni- | | | | ed | | /books/form_create | MyApp::Controller::Books | form_create | | /books/index | MyApp::Controller::Books | index| | /books/list_author | MyApp::Controller::Books | list_author | | /books/delete| MyApp::Controller::Books | delete | | /books/hw_create_do | MyApp::Controller::Books | hw_create_do | | /books/list | MyApp::Controller::Books | list | '--+--+--' [debug] Loaded Path actions: .-+--. | Path| Private | +-+--+ | /books/delete | /books/delete| | /books/form_create | /books/form_create | | /books/form_create_do | /books/form_create_do| |
[Catalyst] Problem with Catalyst::Manual::Tutorial::CatalystBasics tutorial
Hi all, I'm having a frustrating time trying to debug why the Tutorial here: http://search.cpan.org/~jrockway/Catalyst-Manual-5.700501/lib/Catalyst/Manual/Tutorial/CatalystBasics.pod is not working for me. By not working I mean that I do not see the list of books. I get an empty document. I've followed the tutorial word for word. My Books.pm controller list method looks like the following. I have put some debug lines in there to show where I am: sub list : Local { # Retrieve the usual perl OO '$self' for this object. $c is the Catalyst # 'Context' that's used to 'glue together' the various components # that make up the application my ($self, $c) = @_; # Retrieve all of the book records as book model objects and store in the # stash where they can be accessed by the TT template $c-stash-{books} = [$c-model('MyAppDB::Book')-all]; # it does get the books! #print STDERR Dumper($c-stash-{books}); # Set the TT template to use. You will almost always want to do this # in your action methods (action methods respond to user input in # your controllers). $c-stash-{template} = 'books/list.tt2'; # this will contain books/list.tt2 #print STDERR Dumper($c-stash-{template}); # this does print Foo in the document #$c-response-body('Foo'); } My view class looks like this: package MyApp::View::TT; use strict; use base 'Catalyst::View::TT'; __PACKAGE__-config( { CATALYST_VAR = 'Catalyst', INCLUDE_PATH = [ MyApp-path_to( 'root', 'src' ), MyApp-path_to( 'root', 'lib' ) ], PRE_PROCESS = 'config/main', WRAPPER = 'site/wrapper', ERROR= 'error.tt2', TIMER= 0, TEMPLATE_EXTENSION = '.tt2', DUMP_CONFIG = 1, DEBUG = 1 } ); Other facts are that I am running Ubuntu Edgy, I installed the Catalyst package libcatalyst-perl and several others. I am using MySQL 5.0 as the model store. Help! Thanks, Imran -- I am because of who you are, and you are because of who I am. http://www.ubuntulinux.org/ ___ Yahoo! Answers - Got a question? Someone out there knows the answer. Try it now. http://uk.answers.yahoo.com/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Problem with Catalyst::Manual::Tutorial::CatalystBasics tutorial
On Tuesday 10 April 2007 14:18, Imran Chaudhry wrote: ERROR = 'error.tt2', try removing this , it will make TT silently ignore any template errors. -- Bogdan Lucaciu http://www.wiz.ro ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] streaming output to view in real time
Hi, I'm looking for a way to redirect STDOUT from an external application directly into my website, updating in real time. My original plan is to do something like this: 1. Controller popen's some program 2. Reads the file descriptor 3. Redirects each new line into some DIV in my view, showing each new line in real time. This controller would be called after a form submit. #3 is the part I don't know how to do, or if it's even possible. I haven't seen a $c-res method that lets me update directly into a DIV, which I was kind of banking on. The real time part is pretty imperative also. I can't get away with waiting for the program to execute, then dumping all of it's output at once. Any general guidance is greatly appreciated. Thanks, Jimmy ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] streaming output to view in real time
Le 10 avr. 07 à 17:57, Jimmy Cooksey a écrit : Hi, I'm looking for a way to redirect STDOUT from an external application directly into my website, updating in real time. My original plan is to do something like this: 1. Controller popen's some program 2. Reads the file descriptor 3. Redirects each new line into some DIV in my view, showing each new line in real time. This controller would be called after a form submit. #3 is the part I don't know how to do, or if it's even possible. I haven't seen a $c-res method that lets me update directly into a DIV, which I was kind of banking on. The real time part is pretty imperative also. I can't get away with waiting for the program to execute, then dumping all of it's output at once. Any general guidance is greatly appreciated. You want ajax here. I designed stuff maintaining an HTTP connexion open for hours, but it was not pretty. I'd run the task using POE / IPC::Run or Expect and leaving the server process alone. You'd then use Ajax to query the running process. David Morel PGP.sig Description: Ceci est une signature électronique PGP ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Read and Display from i/o file
Hi, I am using Text::Delimited to read in a text file, that's very straigth forward. My problem is I want to display back onto the template what has been read from the file: my $row = $file-read; # for example the file has 2 col: id, name I cannot do like this on the template: [% FOREACH row IN row %] [% row.id %] and [% row.name %] [% END %] Please someone give me a brief explanation why I could not do that, and how can I display the data on the template. Thank you. - Don't get soaked. Take a quick peak at the forecast with theYahoo! Search weather shortcut.___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/