RE: [Catalyst] Can't get view / template to work ?
Sorry for the missing capital, and yes that's what I ran... also I'm sorry if I miss ready the tutorial, I have Dyspraxia. Why would you have two -config statements and not all the setting in one -config , that makes no sense? I did provide the output from the server plus debug screen? -Original Message- From: David Schmidt [mailto:davew...@gmx.at] Sent: 30 October 2012 23:07 To: The elegant MVC web framework Subject: Re: [Catalyst] Can't get view / template to work ? On 31 October 2012 00:00, Tomas Doran bobtf...@bobtfish.net wrote: On 30 Oct 2012, at 16:52, Craig Chant wrote: I seem stuck with implementing my first view / template. I have a controller Login.pm I ran the view helper script ‘create view HTML HTML::template’ This can't possibly have worked? You mean create view HTML HTML::Template right? As per the tutorial I’ve added the following to the config section of MyApp.pm TEMPLATE_EXTENSION = '.tp', This needs to be inside the following block 'View::HTML' = { #Set the location for templates files INCLUDE_PATH = [ __PACKAGE__-path_to( 'root', 'src' ), ], }, C::M::Tutorial says otherwise http://search.cpan.org/~zarquon/Catalyst-Manual-5.9004/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod#Create_a_Catalyst_View I have created a template in ‘root/src/login’ of login.tp In my controller I have … sub login :Path :Args(0) { my ( $self, $c) = @_; $c-stash(template = 'login.tp'); } But all I get is… No idea. What am I doing wrong? Not showing us the full debug output of starting the server and making the request. Sorry to be harsh - but it's impossible to divine what code your app is running without that output… Cheers t0m ___ List: Catalyst@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/ ___ List: Catalyst@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/ This Email and any attachments contain confidential information and is intended solely for the individual to whom it is addressed. If this Email has been misdirected, please notify the author as soon as possible. If you are not the intended recipient you must not disclose, distribute, copy, print or rely on any of the information contained, and all copies must be deleted immediately. Whilst we take reasonable steps to try to identify any software viruses, any attachments to this e-mail may nevertheless contain viruses, which our anti-virus software has failed to identify. You should therefore carry out your own anti-virus checks before opening any documents. HomeLoan Partnership will not accept any liability for damage caused by computer viruses emanating from any attachment or other document supplied with this e-mail. HomeLoan Partnership reserves the right to monitor and archive all e-mail communications through its network. No representative or employee of HomeLoan Partnership has the authority to enter into any contract on behalf of HomeLoan Partnership by email. HomeLoan Partnership is a trading name of H L Partnership Limited, registered in England and Wales with Registration Number 5011722. Registered office: 26-34 Old Street, London, EC1V 9QQ. H L Partnership Limited is authorised and regulated by the Financial Services Authority. ___ List: Catalyst@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/
RE: [Catalyst] Can't get view / template to work ?
You're misread what I put where? It clearly states Edit lib/MyApp/View/HTML.pm and you should see something similar to the following: __PACKAGE__-config( TEMPLATE_EXTENSION = '.tt', render_die = 1, ); And that's where I put the extension setting? -Original Message- From: Tomas Doran [mailto:bobtf...@bobtfish.net] Sent: 30 October 2012 23:12 To: The elegant MVC web framework Subject: Re: [Catalyst] Can't get view / template to work ? On 30 Oct 2012, at 23:06, David Schmidt wrote: On 31 October 2012 00:00, Tomas Doran bobtf...@bobtfish.net wrote: On 30 Oct 2012, at 16:52, Craig Chant wrote: I seem stuck with implementing my first view / template. I have a controller Login.pm I ran the view helper script 'create view HTML HTML::template' This can't possibly have worked? You mean create view HTML HTML::Template right? As per the tutorial I've added the following to the config section of MyApp.pm TEMPLATE_EXTENSION = '.tp', This needs to be inside the following block 'View::HTML' = { #Set the location for templates files INCLUDE_PATH = [ __PACKAGE__-path_to( 'root', 'src' ), ], }, C::M::Tutorial says otherwise http://search.cpan.org/~zarquon/Catalyst-Manual-5.9004/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod#Create_a_Catalyst_View Sorry, but you're wrong. The tutorial says: Edit lib/MyApp/View/HTML.pm and you should see something similar to the following: The OP says: As per the tutorial I've added the following to the config section of MyApp.pm So, the OP has done something totally different to what the tutorial says, and thus it will behave differently. If he moves that line to inside the View (as the tutorial suggests), it'll work. If he moves it to inside the 'View::HTML' block in MyApp.pm, thus namespacing it into the appropriate component, it'll work. Where it is right now - it will be ignored. Cheers t0m ___ List: Catalyst@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/ This Email and any attachments contain confidential information and is intended solely for the individual to whom it is addressed. If this Email has been misdirected, please notify the author as soon as possible. If you are not the intended recipient you must not disclose, distribute, copy, print or rely on any of the information contained, and all copies must be deleted immediately. Whilst we take reasonable steps to try to identify any software viruses, any attachments to this e-mail may nevertheless contain viruses, which our anti-virus software has failed to identify. You should therefore carry out your own anti-virus checks before opening any documents. HomeLoan Partnership will not accept any liability for damage caused by computer viruses emanating from any attachment or other document supplied with this e-mail. HomeLoan Partnership reserves the right to monitor and archive all e-mail communications through its network. No representative or employee of HomeLoan Partnership has the authority to enter into any contract on behalf of HomeLoan Partnership by email. HomeLoan Partnership is a trading name of H L Partnership Limited, registered in England and Wales with Registration Number 5011722. Registered office: 26-34 Old Street, London, EC1V 9QQ. H L Partnership Limited is authorised and regulated by the Financial Services Authority. ___ List: Catalyst@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/
RE: [Catalyst] I'm loosing the plot here? - Controller behaviour that makes no sense
Sorry IRC? I did post the debug and output , has this email not been received? -Original Message- From: Tomas Doran [mailto:bobtf...@bobtfish.net] Sent: 30 October 2012 22:26 To: The elegant MVC web framework Subject: Re: [Catalyst] I'm loosing the plot here? - Controller behaviour that makes no sense On 30 Oct 2012, at 20:08, Craig Chant wrote: The path/controller/action is resolving correctly now, but any response-body change I make in the 'index :Path' action, isn't showing when i refresh my browser? You're not showing us the debug output of the failing request, so it's very hard to help debug that request. If you want this form of interactive help, you'd be much better off dropping into irc for interactive help, rather than the mailing list, which by it's nature is more asynchronous. Hope to see you in irc! Cheers t0m ___ List: Catalyst@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/ This Email and any attachments contain confidential information and is intended solely for the individual to whom it is addressed. If this Email has been misdirected, please notify the author as soon as possible. If you are not the intended recipient you must not disclose, distribute, copy, print or rely on any of the information contained, and all copies must be deleted immediately. Whilst we take reasonable steps to try to identify any software viruses, any attachments to this e-mail may nevertheless contain viruses, which our anti-virus software has failed to identify. You should therefore carry out your own anti-virus checks before opening any documents. HomeLoan Partnership will not accept any liability for damage caused by computer viruses emanating from any attachment or other document supplied with this e-mail. HomeLoan Partnership reserves the right to monitor and archive all e-mail communications through its network. No representative or employee of HomeLoan Partnership has the authority to enter into any contract on behalf of HomeLoan Partnership by email. HomeLoan Partnership is a trading name of H L Partnership Limited, registered in England and Wales with Registration Number 5011722. Registered office: 26-34 Old Street, London, EC1V 9QQ. H L Partnership Limited is authorised and regulated by the Financial Services Authority. ___ List: Catalyst@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/
RE: [Catalyst] Unable to output anything in Root.pm - 'auto'
SQL injection by whom and how? I can't get the template to work, and you think I've got user input set up? I give up, it was I nice idea but I'm going no-where fast. Thanks anyway. -Original Message- From: Tomas Doran [mailto:bobtf...@bobtfish.net] Sent: 30 October 2012 22:22 To: The elegant MVC web framework Subject: Re: [Catalyst] Unable to output anything in Root.pm - 'auto' On 30 Oct 2012, at 12:00, Craig Chant wrote: What was the reason for not using DBIC again? The non-normalised DB with a missing schema and the fact the data is spread across two SQL servers on separate DSN's. You didn't say anything there that didn't imply DBIC is fine. The reason for not using DBIC again? Also, your SQL abstraction has hilarious SQL injection holes - you do know about this, right? It's just before the return of the record set or count I was wondering if I need to add '$sth-finish();' or '$dbh-disconnect();' - which I have in my current (non-catalyst) app version of the class (module). You're doing something wrong with DBI here! I also believe that DBIC gets all columns from all tables, which I don't want, dunno, perhaps I'm missing something with DBIC, but I understand my data the way I retrieve it and didn't think there was anything wrong with using my SQL class, it has served me well for 10 years, and powers all my current apps. That's by default, and optional. One thing I have found already is the app doesn't seem to see real time SQL updates even if I issue$sth-finish();$dbh-disconnect(); at the end of my method. I make a manual change to SQL (switch the 'Locked' flag between 'yes' 'no') , refresh the app and it isn't registering the SQL change, so already it seems something is being cached somewhere and I need to stop this, my apps need to see DB changes instantly. Again, you're doing something wrong or insane here - this is not normal, so you must be asking for it somehow. Cheers t0m ___ List: Catalyst@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/ This Email and any attachments contain confidential information and is intended solely for the individual to whom it is addressed. If this Email has been misdirected, please notify the author as soon as possible. If you are not the intended recipient you must not disclose, distribute, copy, print or rely on any of the information contained, and all copies must be deleted immediately. Whilst we take reasonable steps to try to identify any software viruses, any attachments to this e-mail may nevertheless contain viruses, which our anti-virus software has failed to identify. You should therefore carry out your own anti-virus checks before opening any documents. HomeLoan Partnership will not accept any liability for damage caused by computer viruses emanating from any attachment or other document supplied with this e-mail. HomeLoan Partnership reserves the right to monitor and archive all e-mail communications through its network. No representative or employee of HomeLoan Partnership has the authority to enter into any contract on behalf of HomeLoan Partnership by email. HomeLoan Partnership is a trading name of H L Partnership Limited, registered in England and Wales with Registration Number 5011722. Registered office: 26-34 Old Street, London, EC1V 9QQ. H L Partnership Limited is authorised and regulated by the Financial Services Authority. ___ List: Catalyst@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/
Re: [Catalyst] I'm loosing the plot here? - Controller behaviour that makes no sense
Tomas asked for the debug output of the failing response. You pasted only the server startup debug output. On 31 October 2012 10:46, Craig Chant cr...@homeloanpartnership.com wrote: Sorry IRC? I did post the debug and output , has this email not been received? -Original Message- From: Tomas Doran [mailto:bobtf...@bobtfish.net] Sent: 30 October 2012 22:26 To: The elegant MVC web framework Subject: Re: [Catalyst] I'm loosing the plot here? - Controller behaviour that makes no sense On 30 Oct 2012, at 20:08, Craig Chant wrote: The path/controller/action is resolving correctly now, but any response-body change I make in the 'index :Path' action, isn't showing when i refresh my browser? You're not showing us the debug output of the failing request, so it's very hard to help debug that request. If you want this form of interactive help, you'd be much better off dropping into irc for interactive help, rather than the mailing list, which by it's nature is more asynchronous. Hope to see you in irc! Cheers t0m ___ List: Catalyst@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/ This Email and any attachments contain confidential information and is intended solely for the individual to whom it is addressed. If this Email has been misdirected, please notify the author as soon as possible. If you are not the intended recipient you must not disclose, distribute, copy, print or rely on any of the information contained, and all copies must be deleted immediately. Whilst we take reasonable steps to try to identify any software viruses, any attachments to this e-mail may nevertheless contain viruses, which our anti-virus software has failed to identify. You should therefore carry out your own anti-virus checks before opening any documents. HomeLoan Partnership will not accept any liability for damage caused by computer viruses emanating from any attachment or other document supplied with this e-mail. HomeLoan Partnership reserves the right to monitor and archive all e-mail communications through its network. No representative or employee of HomeLoan Partnership has the authority to enter into any contract on behalf of HomeLoan Partnership by email. HomeLoan Partnership is a trading name of H L Partnership Limited, registered in England and Wales with Registration Number 5011722. Registered office: 26-34 Old Street, London, EC1V 9QQ. H L Partnership Limited is authorised and regulated by the Financial Services Authority. ___ List: Catalyst@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/ ___ List: Catalyst@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/
[Catalyst] Access Catalyst context object from script
Hi, Got a lot of code in a controller that should be moved out and into an external script (that's called by a cronjob) which calls stuff from the Model and then emails it. The script can access the model fine and re-use a Template::Toolkit template already written fine (I'm using MIME::Lite::TT). However, in the template itself there's a lot of calls to the Catalyst context object, in the form of: [% Catalyst.uri_for( ... ) %] ... which aren't displaying anything. I don't really want to hard code the URIs, so is there a way to get access to the Catalyst context object of a running app, in a separate external script? Regards, Anthony Gladdish ___ List: Catalyst@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/
[Catalyst] Catalyst and Java
I have a handful of java servlets that I would like to 'front-end' with my Catalyst application, essentially using Catalyst to provide authentication/authorization before passing along the browser requests to the servlet. I don't need session information in the servlet, and I'm willing to leave the servlet unsecured on an obscure port (network protected, of course) in order to allow Catalyst to more easily interact with it. In my mind, I see Catalyst behaving as a proxy, managing the entire conversation, but I'd also be open to some kind of redirection solution. Does anyone have experience with doing something like this? I'd appreciate any insight or direction. -Tim ___ List: Catalyst@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/
Re: [Catalyst] Unable to output anything in Root.pm - 'auto'
Crag, would you mind stopping in #catalyst onto irc.perl.org it would probably be easier. For instant chat you can follow this link http://chat.mibbit.com/#catal...@irc.perl.org Cheers On Wed, Oct 31, 2012 at 10:51 AM, Craig Chant cr...@homeloanpartnership.com wrote: SQL injection by whom and how? I can't get the template to work, and you think I've got user input set up? I give up, it was I nice idea but I'm going no-where fast. Thanks anyway. -Original Message- From: Tomas Doran [mailto:bobtf...@bobtfish.net] Sent: 30 October 2012 22:22 To: The elegant MVC web framework Subject: Re: [Catalyst] Unable to output anything in Root.pm - 'auto' On 30 Oct 2012, at 12:00, Craig Chant wrote: What was the reason for not using DBIC again? The non-normalised DB with a missing schema and the fact the data is spread across two SQL servers on separate DSN's. You didn't say anything there that didn't imply DBIC is fine. The reason for not using DBIC again? Also, your SQL abstraction has hilarious SQL injection holes - you do know about this, right? It's just before the return of the record set or count I was wondering if I need to add '$sth-finish();' or '$dbh-disconnect();' - which I have in my current (non-catalyst) app version of the class (module). You're doing something wrong with DBI here! I also believe that DBIC gets all columns from all tables, which I don't want, dunno, perhaps I'm missing something with DBIC, but I understand my data the way I retrieve it and didn't think there was anything wrong with using my SQL class, it has served me well for 10 years, and powers all my current apps. That's by default, and optional. One thing I have found already is the app doesn't seem to see real time SQL updates even if I issue$sth-finish();$dbh-disconnect(); at the end of my method. I make a manual change to SQL (switch the 'Locked' flag between 'yes' 'no') , refresh the app and it isn't registering the SQL change, so already it seems something is being cached somewhere and I need to stop this, my apps need to see DB changes instantly. Again, you're doing something wrong or insane here - this is not normal, so you must be asking for it somehow. Cheers t0m ___ List: Catalyst@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/ This Email and any attachments contain confidential information and is intended solely for the individual to whom it is addressed. If this Email has been misdirected, please notify the author as soon as possible. If you are not the intended recipient you must not disclose, distribute, copy, print or rely on any of the information contained, and all copies must be deleted immediately. Whilst we take reasonable steps to try to identify any software viruses, any attachments to this e-mail may nevertheless contain viruses, which our anti-virus software has failed to identify. You should therefore carry out your own anti-virus checks before opening any documents. HomeLoan Partnership will not accept any liability for damage caused by computer viruses emanating from any attachment or other document supplied with this e-mail. HomeLoan Partnership reserves the right to monitor and archive all e-mail communications through its network. No representative or employee of HomeLoan Partnership has the authority to enter into any contract on behalf of HomeLoan Partnership by email. HomeLoan Partnership is a trading name of H L Partnership Limited, registered in England and Wales with Registration Number 5011722. Registered office: 26-34 Old Street, London, EC1V 9QQ. H L Partnership Limited is authorised and regulated by the Financial Services Authority. ___ List: Catalyst@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/ ___ List: Catalyst@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/
Re: [Catalyst] Access Catalyst context object from script
Hello Anthony, I think the catalyst object is not called Catalyst but c, this you need [% c.uri_for(...) %] or you can use [% c.uri_for_action(...) %] to point to particular action. You could change that setting the CATALYST_VAR into your view configuration (as shown here https://metacpan.org/module/Catalyst::View::TT), however I think c is shorter and better default. Cheers On Wed, Oct 31, 2012 at 11:41 AM, Anthony Gladdish anthony.gladd...@newcastle.ac.uk wrote: Hi, Got a lot of code in a controller that should be moved out and into an external script (that's called by a cronjob) which calls stuff from the Model and then emails it. The script can access the model fine and re-use a Template::Toolkit template already written fine (I'm using MIME::Lite::TT). However, in the template itself there's a lot of calls to the Catalyst context object, in the form of: [% Catalyst.uri_for( ... ) %] ... which aren't displaying anything. I don't really want to hard code the URIs, so is there a way to get access to the Catalyst context object of a running app, in a separate external script? Regards, Anthony Gladdish ___ List: Catalyst@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/ ___ List: Catalyst@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/
Re: [Catalyst] Access Catalyst context object from script
Your script is not running under Catalyst, so $c, or the Catalyst context, is not available. $c manages HTTP requests and responses. It sounds like your approach/design may be slightly flawed. Perhaps explain what you're trying to achieve - what are you doing with these templates? where are they going? why do they have URLs to your Catalyst app in them? Cheers, Robsco On 10/31/2012 11:18 AM, Dimitar Petrov wrote: Hello Anthony, I think the catalyst object is not called Catalyst but c, this you need [% c.uri_for(...) %] or you can use [% c.uri_for_action(...) %] to point to particular action. You could change that setting the CATALYST_VAR into your view configuration (as shown here https://metacpan.org/module/Catalyst::View::TT), however I think c is shorter and better default. Cheers On Wed, Oct 31, 2012 at 11:41 AM, Anthony Gladdish anthony.gladd...@newcastle.ac.uk mailto:anthony.gladd...@newcastle.ac.uk wrote: Hi, Got a lot of code in a controller that should be moved out and into an external script (that's called by a cronjob) which calls stuff from the Model and then emails it. The script can access the model fine and re-use a Template::Toolkit template already written fine (I'm using MIME::Lite::TT). However, in the template itself there's a lot of calls to the Catalyst context object, in the form of: [% Catalyst.uri_for( ... ) %] ... which aren't displaying anything. I don't really want to hard code the URIs, so is there a way to get access to the Catalyst context object of a running app, in a separate external script? Regards, Anthony Gladdish ___ List: Catalyst@lists.scsys.co.uk mailto:Catalyst@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/ ___ List: Catalyst@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/ -- IntelCompute Web Design Online Marketing Experts http://www.intelcompute.com ___ List: Catalyst@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/
Re: [Catalyst] Access Catalyst context object from script
On 31 October 2012 10:41, Anthony Gladdish anthony.gladd...@newcastle.ac.uk wrote: Hi, Got a lot of code in a controller that should be moved out and into an external script (that's called by a cronjob) which calls stuff from the Model and then emails it. The script can access the model fine and re-use a Template::Toolkit template already written fine (I'm using MIME::Lite::TT). However, in the template itself there's a lot of calls to the Catalyst context object, in the form of: [% Catalyst.uri_for( ... ) %] ... which aren't displaying anything. I don't really want to hard code the URIs, so is there a way to get access to the Catalyst context object of a running app, in a separate external script? I can understand the reluctance to hard-code URIs, however i would be reluctant to suggest that you bring in the whole of Catalyst just to satisfy this one requirement. What is the template? I presume it is an email, and that you are putting links to locations within your Catalyst application into the email? What form of uri_for are you using? If it is just to capture the applications root then could you replace it with your own convenience routine that just implemented that aspect of what uri_for is doing without bringing in the whole of Catalyst? Regards Ian ___ List: Catalyst@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/
RE: [Catalyst] I'm loosing the plot here? - Controller behaviour that makes no sense
Sorry, I'm getting confused the way this mailing list works as it is all fragmented with the replies, the last one I saw was a request for the server start-up output. Any chance the Catalyst community could setup a proper forum, vBulletin or such like, it's much easier and user friendly! However, I've come to the conclusion Catalyst doesn’t work properly over IIS7 Active-State Perl. This is what I have in MyApp.pm , HTML.pm the Root.pm MyApp.pm package HLP_Members; use Moose; use namespace::autoclean; use Catalyst::Runtime 5.80; # Set flags and add plugins for the application. # # Note that ORDERING IS IMPORTANT here as plugins are initialized in order, # therefore you almost certainly want to keep ConfigLoader at the head of the # list if you're using it. # # -Debug: activates the debug mode for very useful log messages # ConfigLoader: will load the configuration from a Config::General file in the # application's home directory # Static::Simple: will serve static files from the application's root # directory use Catalyst qw/ -Debug ConfigLoader Static::Simple StackTrace Session Session::Store::FastMmap Session::State::Cookie /; extends 'Catalyst'; our $VERSION = '0.01'; # Configure the application. # # Note that settings in hlp_members.conf (or other external # configuration file that you set up manually) take precedence # over this when using ConfigLoader. Thus configuration # details given here can function as a default configuration, # with an external configuration file acting as an override for # local deployment. __PACKAGE__-config( name = 'HLP_Members', # Disable deprecated behavior needed by old applications disable_component_resolution_regex_fallback = 1, enable_catalyst_header = 1, # Send X-Catalyst header 'Plugin::Static::Simple' = {dirs = ['static', qr/^(images|css)/,]}, use_request_uri_for_path = 1, ); __PACKAGE__-config( # Configure the view 'View::HTML' = { #Set the location for TT files INCLUDE_PATH = [ __PACKAGE__-path_to( 'root', 'src' ), ], }, ); # Start the application __PACKAGE__-setup(); 1; HTML.pm package HLP_Members::View::HTML; use strict; use base 'Catalyst::View::HTML::Template'; __PACKAGE__-config( # Change default TT extension TEMPLATE_EXTENSION = '.tp', render_die = 1, ); 1; Root.pm package HLP_Members::Controller::Root; use Moose; use namespace::autoclean; BEGIN { extends 'Catalyst::Controller' } # # Sets the actions in this controller to be registered with no prefix # so they function identically to actions created in MyApp.pm # __PACKAGE__-config(namespace = ''); sub index :Path :Args(0) { my ( $self, $c ) = @_; # Hello World $c-response-body( $c-welcome_message ); } # always runs first! sub begin :Private { my ( $self, $c ) = @_; # Authenticate $self-AuthenticateUser($c); return 1; } sub default :Path { my ( $self, $c ) = @_; $c-response-body( 'Page not found' ); $c-response-status(404); } sub AuthenticateUser { my ( $self, $c ) = @_; $c-session; if(!defined $c-session-{user} || !$c-model('Members')-LogCheck($c)){ #$c-forward('/login/login'); } } sub end : ActionClass('RenderView') {} __PACKAGE__-meta-make_immutable; 1; Here is a link to a screen shot, clearly showing that the same app behaves differently between the devel server and IIS7. http://www.homeloanpartnership.com/catalyst.gif The app doesn't display changed content when viewed over IIS7 and IE, I've turned off caching on IIS7 under 'Output Caching' options, it makes no difference, and I've never had a caching issue before whether it’s PHP, ASP or CGI Perl? Something is being cached somewhere by something otherwise why would the same application on the same server using the same browser show different output for the same application, the only difference is one is being served by the devel server and the other is via IIS7? This is why I've had problems understanding what works, because I make a change and nothing happens, so how can I develop and test from a front end user perspective when changes are not reflected when the browser is refreshed? What's odd is the screen updates because the hash numbers change on the debug output to the browser each time I click refresh instead of actually showing me the changed content. How is this possible? How can it be showing me an old error, with new hash references, for output that doesn't exist anymore in the application? On top of this, the path config for templates isn't working either, even though I've now added the two separate -config code segments (shown above) as per the tutorial to MyApp.pm and when I put the template in the root, it falls over from what appears to me to be moaning about the line in the HTML.pm View use base 'Catalyst::View::HTML::Template';, which was
Re: [Catalyst] I'm loosing the plot here? - Controller behaviour that makes no sense
Craig, Seriously, come and talk to us on irc... http://chat.mibbit.com/#catal...@irc.perl.org It's much easier/faster to get answers in real-time. Cheers, Robsco On 10/31/2012 11:42 AM, Craig Chant wrote: Sorry, I'm getting confused the way this mailing list works as it is all fragmented with the replies, the last one I saw was a request for the server start-up output. Any chance the Catalyst community could setup a proper forum, vBulletin or such like, it's much easier and user friendly! However, I've come to the conclusion Catalyst doesn’t work properly over IIS7 Active-State Perl. This is what I have in MyApp.pm , HTML.pm the Root.pm MyApp.pm package HLP_Members; use Moose; use namespace::autoclean; use Catalyst::Runtime 5.80; # Set flags and add plugins for the application. # # Note that ORDERING IS IMPORTANT here as plugins are initialized in order, # therefore you almost certainly want to keep ConfigLoader at the head of the # list if you're using it. # # -Debug: activates the debug mode for very useful log messages # ConfigLoader: will load the configuration from a Config::General file in the # application's home directory # Static::Simple: will serve static files from the application's root # directory use Catalyst qw/ -Debug ConfigLoader Static::Simple StackTrace Session Session::Store::FastMmap Session::State::Cookie /; extends 'Catalyst'; our $VERSION = '0.01'; # Configure the application. # # Note that settings in hlp_members.conf (or other external # configuration file that you set up manually) take precedence # over this when using ConfigLoader. Thus configuration # details given here can function as a default configuration, # with an external configuration file acting as an override for # local deployment. __PACKAGE__-config( name = 'HLP_Members', # Disable deprecated behavior needed by old applications disable_component_resolution_regex_fallback = 1, enable_catalyst_header = 1, # Send X-Catalyst header 'Plugin::Static::Simple' = {dirs = ['static', qr/^(images|css)/,]}, use_request_uri_for_path = 1, ); __PACKAGE__-config( # Configure the view 'View::HTML' = { #Set the location for TT files INCLUDE_PATH = [ __PACKAGE__-path_to( 'root', 'src' ), ], }, ); # Start the application __PACKAGE__-setup(); 1; HTML.pm package HLP_Members::View::HTML; use strict; use base 'Catalyst::View::HTML::Template'; __PACKAGE__-config( # Change default TT extension TEMPLATE_EXTENSION = '.tp', render_die = 1, ); 1; Root.pm package HLP_Members::Controller::Root; use Moose; use namespace::autoclean; BEGIN { extends 'Catalyst::Controller' } # # Sets the actions in this controller to be registered with no prefix # so they function identically to actions created in MyApp.pm # __PACKAGE__-config(namespace = ''); sub index :Path :Args(0) { my ( $self, $c ) = @_; # Hello World $c-response-body( $c-welcome_message ); } # always runs first! sub begin :Private { my ( $self, $c ) = @_; # Authenticate $self-AuthenticateUser($c); return 1; } sub default :Path { my ( $self, $c ) = @_; $c-response-body( 'Page not found' ); $c-response-status(404); } sub AuthenticateUser { my ( $self, $c ) = @_; $c-session; if(!defined $c-session-{user} || !$c-model('Members')-LogCheck($c)){ #$c-forward('/login/login'); } } sub end : ActionClass('RenderView') {} __PACKAGE__-meta-make_immutable; 1; Here is a link to a screen shot, clearly showing that the same app behaves differently between the devel server and IIS7. http://www.homeloanpartnership.com/catalyst.gif The app doesn't display changed content when viewed over IIS7 and IE, I've turned off caching on IIS7 under 'Output Caching' options, it makes no difference, and I've never had a caching issue before whether it’s PHP, ASP or CGI Perl? Something is being cached somewhere by something otherwise why would the same application on the same server using the same browser show different output for the same application, the only difference is one is being served by the devel server and the other is via IIS7? This is why I've had problems understanding what works, because I make a change and nothing happens, so how can I develop and test from a front end user perspective when changes are not reflected when the browser is refreshed? What's odd is the screen updates because the hash numbers change on the debug output to the browser each time I click refresh instead of actually showing me the changed content. How is this possible? How can it be showing me an old error, with new hash references, for output that doesn't exist anymore in the application? On top of this, the path config for templates isn't working either, even though I've now added the two
Re: [Catalyst] Can't get view / template to work ?
On 31 October 2012 09:31, Craig Chant cr...@homeloanpartnership.com wrote: You're misread what I put where? It clearly states Edit lib/MyApp/View/HTML.pm and you should see something similar to the following: __PACKAGE__-config( TEMPLATE_EXTENSION = '.tt', render_die = 1, ); And that's where I put the extension setting? Yet you claimed in your first message in this thread, to have added: TEMPLATE_EXTENSION = '.tp', 'View::HTML' = { #Set the location for templates files INCLUDE_PATH = [ __PACKAGE__-path_to( 'root', 'src' ), ], }, ... to the config section of MyApp.pm, and you're being told that's wrong. ___ List: Catalyst@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/
Re: [Catalyst] Can't get view / template to work ?
On 2012-10-31 13:28, Will Crawford wrote: On 31 October 2012 09:31, Craig Chant cr...@homeloanpartnership.com wrote: You're misread what I put where? It clearly states Edit lib/MyApp/View/HTML.pm and you should see something similar to the following: __PACKAGE__-config( TEMPLATE_EXTENSION = '.tt', render_die = 1, ); And that's where I put the extension setting? Yet you claimed in your first message in this thread, to have added: TEMPLATE_EXTENSION = '.tp', 'View::HTML' = { #Set the location for templates files INCLUDE_PATH = [ __PACKAGE__-path_to( 'root', 'src' ), ], }, ... to the config section of MyApp.pm, and you're being told that's wrong. Guys, Craig is on IRC now and I'm helping him to resolve the issue. He is using Catalyst::View::HTML::Template not ::TT so the options are different. ___ List: Catalyst@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/ *** T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien Handelsgericht Wien, FN 79340b *** Notice: This e-mail contains information that is confidential and may be privileged. If you are not the intended recipient, please notify the sender and then delete this e-mail immediately. *** ___ List: Catalyst@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/
RE: [Catalyst] Access Catalyst context object from script
-Original Message- From: Ian Docherty [mailto:catal...@iandocherty.com] Sent: 31 October 2012 11:29 To: The elegant MVC web framework Subject: Re: [Catalyst] Access Catalyst context object from script On 31 October 2012 10:41, Anthony Gladdish anthony.gladd...@newcastle.ac.uk wrote: Hi, Got a lot of code in a controller that should be moved out and into an external script (that's called by a cronjob) which calls stuff from the Model and then emails it. The script can access the model fine and re-use a Template::Toolkit template already written fine (I'm using MIME::Lite::TT). However, in the template itself there's a lot of calls to the Catalyst context object, in the form of: [% Catalyst.uri_for( ... ) %] ... which aren't displaying anything. I don't really want to hard code the URIs, so is there a way to get access to the Catalyst context object of a running app, in a separate external script? I can understand the reluctance to hard-code URIs, however i would be reluctant to suggest that you bring in the whole of Catalyst just to satisfy this one requirement. What is the template? I presume it is an email, and that you are putting links to locations within your Catalyst application into the email? Correct. It's a bog standard .tt file printing text to be sent as an email, containing links to actions within the Cat app. What form of uri_for are you using? If it is just to capture the applications root then could you replace it with your own convenience routine that just implemented that aspect of what uri_for is doing without bringing in the whole of Catalyst? [% Catalyst.uri_for(Catalyst.controller('MyController').action_for('myaction'), [ some_id ] ) %] Could you offer an example, based on my uri_for example above? Thanks, Anthony ___ List: Catalyst@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/
RE: [Catalyst] Access Catalyst context object from script
From: Dimitar Petrov [mailto:mita...@gmail.com] Sent: 31 October 2012 11:18 To: The elegant MVC web framework Subject: Re: [Catalyst] Access Catalyst context object from script Hello Anthony, I think the catalyst object is not called Catalyst but c, this you need [% c.uri_for(...) %] or you can use [% c.uri_for_action(...) %] to point to particular action. You could change that setting the CATALYST_VAR into your view configuration (as shown here https://metacpan.org/module/Catalyst::View::TT), however I think c is shorter and better default. Cheers That's not the issue here; I can use CATALYST_VAR to rename it to whatever I want, it still doesn't give me access to the Catalyst's context object outside of a catalyst app - which is what I'm after here. I'm trying to get an external script run by a cronjob, to re-use an existing Catalyst template containing [% c.uri_for() %] statements that point to actions within the cat app itself, instead of having to hard code URIs. Regards, Anthony ___ List: Catalyst@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/
Re: [Catalyst] Access Catalyst context object from script
On 2012-10-31 13:30, Anthony Gladdish wrote: -Original Message- From: Ian Docherty [mailto:catal...@iandocherty.com] Sent: 31 October 2012 11:29 To: The elegant MVC web framework Subject: Re: [Catalyst] Access Catalyst context object from script On 31 October 2012 10:41, Anthony Gladdish anthony.gladd...@newcastle.ac.uk wrote: Hi, Got a lot of code in a controller that should be moved out and into an external script (that's called by a cronjob) which calls stuff from the Model and then emails it. The script can access the model fine and re-use a Template::Toolkit template already written fine (I'm using MIME::Lite::TT). However, in the template itself there's a lot of calls to the Catalyst context object, in the form of: [% Catalyst.uri_for( ... ) %] ... which aren't displaying anything. I don't really want to hard code the URIs, so is there a way to get access to the Catalyst context object of a running app, in a separate external script? I can understand the reluctance to hard-code URIs, however i would be reluctant to suggest that you bring in the whole of Catalyst just to satisfy this one requirement. What is the template? I presume it is an email, and that you are putting links to locations within your Catalyst application into the email? Correct. It's a bog standard .tt file printing text to be sent as an email, containing links to actions within the Cat app. What form of uri_for are you using? If it is just to capture the applications root then could you replace it with your own convenience routine that just implemented that aspect of what uri_for is doing without bringing in the whole of Catalyst? [% Catalyst.uri_for(Catalyst.controller('MyController').action_for('myaction'), [ some_id ] ) %] Could you offer an example, based on my uri_for example above? I suggest to load your Catalyst app with a config that doesn't load unnecessary stuff like the models and views, just the controllers and use $c-uri_for_action. Take a look at how Catalyst::Test::ctx_request does it or even use Catalyst::Test... Thanks, Anthony ___ List: Catalyst@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/ *** T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien Handelsgericht Wien, FN 79340b *** Notice: This e-mail contains information that is confidential and may be privileged. If you are not the intended recipient, please notify the sender and then delete this e-mail immediately. *** ___ List: Catalyst@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/
RE: [Catalyst] Access Catalyst context object from script
-Original Message- From: Alexander Hartmaier [mailto:alexander.hartmaier@t- systems.at] Sent: 31 October 2012 12:46 To: catalyst@lists.scsys.co.uk Subject: Re: [Catalyst] Access Catalyst context object from script I suggest to load your Catalyst app with a config that doesn't load unnecessary stuff like the models and views, just the controllers and use $c-uri_for_action. Take a look at how Catalyst::Test::ctx_request does it or even use Catalyst::Test... Great - this worked, thanks. I used: use Catalyst::Test 'MyApp'; my($res, $c) = ctx_request('/'); ... then I just pass $c into the layer I use for the TT/mailing bit: $params{Catalyst} = $c; # New MIME::Lite::TT object: my $msg = MIME::Lite::TT-new( From= $from, To = $to, Subject = $subject, Template= $template_path, TmplOptions = \%options, TmplParams = \%params, ); Thanks for your help, Anthony ___ List: Catalyst@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/
Re: [Catalyst] Catalyst and Java
On Wed, Oct 31, 2012 at 3:50 AM, Tim Anderson tja...@gmail.com wrote: I have a handful of java servlets that I would like to 'front-end' with my Catalyst application, essentially using Catalyst to provide authentication/authorization before passing along the browser requests to the servlet. I don't need session information in the servlet, and I'm willing to leave the servlet unsecured on an obscure port (network protected, of course) in order to allow Catalyst to more easily interact with it. In my mind, I see Catalyst behaving as a proxy, managing the entire conversation, but I'd also be open to some kind of redirection solution. Does anyone have experience with doing something like this? I'd appreciate any insight or direction. -Tim ___ List: Catalyst@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/ This would be fairly do-able if you used REST for inter-app communication. Or something like Message::Passing, which allows you to send a message to a queue, which could be subscribed to from both ends, thus allowing the apps to talk to each other. If the Catalyst app is acting as a proxy to the servlets, I would think you could do a pretty regular authentication/authorization/session set up with it and just pass along whatever other info you need to the servlets via the aforementioned means. -- Devin Austin http://www.dhoss.net 9702906669 - Cell ___ List: Catalyst@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/
Re: [Catalyst] Catalyst and Java
On Wed, Oct 31, 2012 at 8:41 AM, Devin Austin devin.aus...@gmail.com wrote: On Wed, Oct 31, 2012 at 3:50 AM, Tim Anderson tja...@gmail.com wrote: I have a handful of java servlets that I would like to 'front-end' with my Catalyst application, essentially using Catalyst to provide authentication/authorization before passing along the browser requests to the servlet. Does anyone have experience with doing something like this? I'd appreciate any insight or direction. This would be fairly do-able if you used REST for inter-app communication. Or something like Message::Passing, which allows you to send a message to a queue, which could be subscribed to from both ends, thus allowing the apps to talk to each other. If the Catalyst app is acting as a proxy to the servlets, I would think you could do a pretty regular authentication/authorization/session set up with it and just pass along whatever other info you need to the servlets via the aforementioned means. Another approach worth considering is to wrap the servlets up in a model. This often takes a bit longer and more thinking in the set-up phase but will give you code that is easier to reuse in other places. I've done this kind of problem both ways and either is fine but I'd lean to the model. You would end up with something you could run with Catalyst/Flea/Mojolicious/in-line-plack-with-auth-middleware/command-line/whatever. ___ List: Catalyst@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/
Re: [Catalyst] Can't get view / template to work ?
On 31 Oct 2012, at 09:29, Craig Chant wrote: Sorry for the missing capital, and yes that's what I ran... also I'm sorry if I miss ready the tutorial, I have Dyspraxia. Why would you have two -config statements and not all the setting in one -config , that makes no sense? Right - you're given the choice to organise things however makes sense to you.. I did provide the output from the server plus debug screen? Not in this thread, that I can see. Apologies if that's me being blind, but I do not see any logs of the server startup debug, or debug for a request. Cheers t0m ___ List: Catalyst@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/
Re: [Catalyst] Catalyst and Java
Thank you both for your suggestions. Creating my own model is along the lines of what I was thinking, but I know in advance that this is going to really stretch my abilities. Another possibility that has occurred to me since my original post is that I could remove the authentication to Apache (using Catalyst::Authentication::Credential::Remote). If the authentication is at that level, I know I can get it to protect both resources and provide a seamless experience to the user. Somehow, though, creating my own model seems like the more appealing option -Tim On Wed, Oct 31, 2012 at 12:22 PM, Ashley Pond V a...@sedition.com wrote: On Wed, Oct 31, 2012 at 8:41 AM, Devin Austin devin.aus...@gmail.com wrote: On Wed, Oct 31, 2012 at 3:50 AM, Tim Anderson tja...@gmail.com wrote: I have a handful of java servlets that I would like to 'front-end' with my Catalyst application, essentially using Catalyst to provide authentication/authorization before passing along the browser requests to the servlet. Does anyone have experience with doing something like this? I'd appreciate any insight or direction. This would be fairly do-able if you used REST for inter-app communication. Or something like Message::Passing, which allows you to send a message to a queue, which could be subscribed to from both ends, thus allowing the apps to talk to each other. If the Catalyst app is acting as a proxy to the servlets, I would think you could do a pretty regular authentication/authorization/session set up with it and just pass along whatever other info you need to the servlets via the aforementioned means. Another approach worth considering is to wrap the servlets up in a model. This often takes a bit longer and more thinking in the set-up phase but will give you code that is easier to reuse in other places. I've done this kind of problem both ways and either is fine but I'd lean to the model. You would end up with something you could run with Catalyst/Flea/Mojolicious/in-line-plack-with-auth-middleware/command-line/whatever. ___ List: Catalyst@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/ ___ List: Catalyst@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/
Re: [Catalyst] Can't get view / template to work ?
On 31 Oct 2012, at 12:32, Alexander Hartmaier wrote: Guys, Craig is on IRC now and I'm helping him to resolve the issue. He is using Catalyst::View::HTML::Template not ::TT so the options are different. Awesome, thanks for jumping in an helping, much appreciated! (I have been real busy so not looking at irc at all today). Cheers t0m ___ List: Catalyst@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/