Re: [Catalyst] Database connections leaking
On Sat, 22 Dec 2007 15:34:14 +1030 Jon Schutz <[EMAIL PROTECTED]> wrote: >It seems to me you would know about it, one way or another, if you had >3000 apache processes! > It would seem so, wouldn't it? :-) From what I remember, though, we never saw a real increase in port 443 connections. >I would speculate that the logic in Catalyst::Model::DBI that checks >whether it currently has an active connection, is not working for >remote Postgres connections, so it keeps creating new ones. That makes sense. I even looked at C::M::DBI, quite a bit, but it just didn't make it through all my hair-pulling . . . >I suggest (a) making sure you have the latest version of DBI and DBD::pg and >postgres libraries, I will do that tomorrow, although I'm pretty sure they're fairly current -- the servers were just built a few weeks ago (Gentoo, from scratch). >and if that doesn't solve it, (b) add debug into Catalyst::Model::DBI >stay_connected sub to find out which bit of the logic is causing a >reconnect. > See? Now *that's* what I should have realized! ;-) Even after looking at that code, it didn't occur to me to add the debug code; of course, I have debug code all over everything else. Looks like I will be driving in to work tomorrow . . . >As I'm not much of a postgres or mod_perl user, I bow out here and let >the experts take over... > Well, I would like to thank you profusely. You've at least helped clear the cobwebs away from my overworked brain cell and given me a bit of hope that I'm not entirely out of my depth -- close, but not completely, yet! :-) Thanks, again. -- Kevin Nathan (Arizona, USA) [EMAIL PROTECTED] Open standards. Open source. Open minds. The command line is the front line. Linux 2.6.16.27-0.9-default 12:08am up 10:19, 18 users, load average: 0.33, 1.06, 1.65 ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] javascript in Catalyst using Template Toolkit
On 22. des.. 2007, at 06.37, Kieren Diment wrote: On 22 Dec 2007, at 16:25, John Romkey wrote: Since uri_for() won't help with static file paths, is there any convention for storing the path for static files in the config, or getting access to it in some other way? Actually I've wanted a relative_uri_for() for a while. Not that badly apparently, otherwise I would have established that either a. something with this funcitonality already exists, or b. I would have implemented it and sent patches back in. All it is is the relative URI without the host name to be honest, so I guess it would be pretty straightforward to implement. not sure I understand you, but c.uri_for('something/ something').path_part (I think that is the name of the method) - andreas ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] javascript in Catalyst using Template Toolkit
On 22 Dec 2007, at 16:25, John Romkey wrote: Since uri_for() won't help with static file paths, is there any convention for storing the path for static files in the config, or getting access to it in some other way? Actually I've wanted a relative_uri_for() for a while. Not that badly apparently, otherwise I would have established that either a. something with this funcitonality already exists, or b. I would have implemented it and sent patches back in. All it is is the relative URI without the host name to be honest, so I guess it would be pretty straightforward to implement. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] javascript in Catalyst using Template Toolkit
On Dec 21, 2007, at 1:51 PM, Matt S Trout wrote: On Thu, Dec 20, 2007 at 02:11:50PM -0500, John Romkey wrote: Two recommendations, assuming the Javascript file isn't meant to be modified at runtime: First, use an absolute path to the file in your script tag, ie:
[Catalyst] Catalyst::Plugin::Subrequest broken with Catalyst-Runtime-5.0712?
Has anyone else had a problem with Catalyst::Plugin::Subrequest and the new release of the runtime? Since I've tried it out on my dev environment I'm seeing it throw errors like: Caught exception in UVFoodApp::Controller::Info->business "Can't locate object method "getNodeValue" via package "Catalyst::Stats" at / Library/Perl/5.8.6/Catalyst/Plugin/SubRequest.pm line 87." It looks like where it used to be getting a Tree::Simple object it's now getting Catalyst::Stats I'm not savvy enough on Catalyst internals to suggest a fix... it's easy enough to work around by disabling that chunk of code in Catalyst::Plugin::Subrequest or not running in debug mode, but that's obviously not the right solution. - john romkey http://www.romkey.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/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Database connections leaking
On Fri, 2007-12-21 at 21:32 -0700, Kevin Nathan wrote: > > I can't check the server right now (need to be at work for that), but I > didn't think to watch for Apache/mod_perl processes. What we were > looking for was port 5432 connections (postgres). When it works, we get > two or three connections per login and they stay steady. When it's not > working, they continuously increase until config limit is reached > (we've gone as high as 3000 connections). > > It will be a few days now, before I can check it again unless I get > some time to drive to the colocation, but I will check for the Apache > processes. If they are going up, too, where should I look? Any hints > (or websites) that may help? > > Thanks for the quick response! > It seems to me you would know about it, one way or another, if you had 3000 apache processes! I would speculate that the logic in Catalyst::Model::DBI that checks whether it currently has an active connection, is not working for remote Postgres connections, so it keeps creating new ones. I suggest (a) making sure you have the latest version of DBI and DBD::pg and postgres libraries, and if that doesn't solve it, (b) add debug into Catalyst::Model::DBI stay_connected sub to find out which bit of the logic is causing a reconnect. As I'm not much of a postgres or mod_perl user, I bow out here and let the experts take over... -- Jon SchutzMy tech notes http://notes.jschutz.net Chief Technology Officerhttp://www.youramigo.com YourAmigo ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Database connections leaking
On Sat, 22 Dec 2007 13:32:00 +1030 Jon Schutz <[EMAIL PROTECTED]> wrote: >On Fri, 2007-12-21 at 18:34 -0700, [EMAIL PROTECTED] wrote: > >> >> The program seems to be working fine while on the Catalyst test >> server, and when on an Apache/mod_perl server when the postgres >> database is on the same physical server. The database connections >> don't start leaking until we attempt to use a separate (physical) >> database server. We verified this using iptraf and seeing none of >> the connections being re-used *or* closed. >> > > >How many database connections are you actually seeing? You should >expect up to one per Apache/mod_perl process. Are you also seeing >growth in the number of Apache processes? > I can't check the server right now (need to be at work for that), but I didn't think to watch for Apache/mod_perl processes. What we were looking for was port 5432 connections (postgres). When it works, we get two or three connections per login and they stay steady. When it's not working, they continuously increase until config limit is reached (we've gone as high as 3000 connections). It will be a few days now, before I can check it again unless I get some time to drive to the colocation, but I will check for the Apache processes. If they are going up, too, where should I look? Any hints (or websites) that may help? Thanks for the quick response! -- Kevin Nathan (Arizona, USA) [EMAIL PROTECTED] Open standards. Open source. Open minds. The command line is the front line. Linux 2.6.16.27-0.9-default 9:29pm up 7:40, 18 users, load average: 0.27, 0.25, 0.35 ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Database connections leaking
On Fri, 2007-12-21 at 18:34 -0700, [EMAIL PROTECTED] wrote: > > The program seems to be working fine while on the Catalyst test > server, and when on an Apache/mod_perl server when the postgres > database is on the same physical server. The database connections > don't start leaking until we attempt to use a separate (physical) > database server. We verified this using iptraf and seeing none of the > connections being re-used *or* closed. > How many database connections are you actually seeing? You should expect up to one per Apache/mod_perl process. Are you also seeing growth in the number of Apache processes? -- Jon SchutzMy tech notes http://notes.jschutz.net Chief Technology Officerhttp://www.youramigo.com YourAmigo ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Database connections leaking
Just for background, I have inherited a Catalyst/TT/Postgresql/Apache2/mod_perl web application. The programmer that was responsible for the design and initial coding left our company and is unavailable for consults. I am very new to Catalyst, fair level of experience in TT, Perl and postgresql. Very little experience in Apache and none in mod_perl. I'm an old C and ASM programmer, stumbling my way through the web-centric world -- and actually liking it, until this problem! :-) The program seems to be working fine while on the Catalyst test server, and when on an Apache/mod_perl server when the postgres database is on the same physical server. The database connections don't start leaking until we attempt to use a separate (physical) database server. We verified this using iptraf and seeing none of the connections being re-used *or* closed. The following two modules are present in the system: --- package MyApp::Model::DBI; use warnings; use strict; use base 'Catalyst::Model::DBI'; __PACKAGE__->config( dsn => 'dbi:Pg:dbname=xyz', user => 'xyz', password => 'xyz', options => {AutoCommit => 1, RaiseError=>1} ); --- --- package MyApp::Model::Default; use warnings; use strict; use base qw( Catalyst::Model::DBIC::Schema ); __PACKAGE__->config( schema_class => 'MyApp::Schema', connect_info => [ 'dbi:Pg:dbname=xyz', 'xyz', 'xyz', ], ); --- My gut feeling is this may be part of the problem, but the Model::DBI is needed for direct SQL queries (many weeks of work needed to convert them to the Catalyst method) and the current authentication system, while the Model::Default is needed for all the Model::* packages using the Catalyst system. (A script utilizing DBIx::Class::Schema::Loader keeps all of our Schema files matched to the database.) The 'dsn' entry in the above files works fine for the web server and database server on one machine. When we change it to: 'dbi:Pg:dbname=xyz;host=10.10.0.34' to access a different server for the database, that's when the connection leaking goes nuts -- the program still works fine until it dies from lack of connections. I've been searching the web and not finding many answers. I've gone through about a year's worth of msgs on this mailing list and didn't see anything that helped. If someone could point me to some documents or threads or other source of info (or maybe a more appropriate mailing list if I picked wrong!) that could shed light on this for me, I'd be grateful. And my one, remaining, brain cell would last me a while longer . . . -- Kevin Nathan [EMAIL PROTECTED] ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Problem with Catalyst::Plugin::I18N using UTF-8
On Friday 21 December 2007 22:35:19 Ash Berlin wrote: > Right, I think there is some confusion on your part as to what is the > proper way of handling unicode in perl. Yes, I have always found UTF-8 confusing ;) > > (The basic problem is that "perl's magic internal representation" just > happens to look exactly like UTF-8 plus a magic flag. Longer > description below) Ok, I find this UTF8 flag a little more confusing than probably needed, but I'll try keep that in mind. > > > First off, you need to understand the difference between characters > and bytes/octets > > "æøå" is a character string > "\303\246\303\270\303\245" is a utf8 byte sequence != a string > > "\303\246\303\270\303\245" + UTF8 flag = "æøå" perl string From what I think I know, "\303\246\303\270\303\245" is a string in unicode representation, but becomes garbage when trying to display it as something else (like ISO-8859-1). > > From perldoc perlunicode > > [...] > > To relate this to your problem, you are getting some of your data > double encoded because the data (from the perl module you are using to > access your LDAP server) is returning a byte sequence that perl > doesn't know is supposed to be UTF8. > > The answer is to do Encode::decode("utf8", $utf8_byte_sequence) > on all the data coming back from your LDAP server (or to find the > right option to make the module you are using do it). I'm not having any problems with my LDAP server or any data that is sent to or from it... not yet at least ;) > > Any of this make any sense? Yes, some. ...but I'll wait a while before using the Catalyst::Plugin::Unicode, since I solved my problems by changing the "Decode" parameter to 0 and avoid using the utf8::encode method in uri_for. The value I pass to uri_for is coming from the I18N plugin, which already is UTF-8. According to the utf8 manpage the utf8 pragma should not be used unless you are writing your source code in utf8. I write my source code in utf8, but as I understand you should not use utf8::encode unless you write characters like "æøå" in your code. My "æøå" comes from other sources, such as the browser or LDAP, therefore I should not run utf8::encode on those variables. I made four tests, split in two groups. The first group gets its input from a variable in code, while the second group gets input from a parameter on the command line. The first tests in each group just prints it, while the second tests runs utf8::encode on the variable. For what I understand from this, utf8::encode brings nothing useful in Catalyst::uri_for, only pain. # From inside code perl -e 'use utf8; my $a = "test æøå"; print $a;' test �� perl -e 'use utf8; my $a = "test æøå"; utf8::encode $a; print $a;' test æøå # From arguments on command line perl -e 'use utf8; my $a = shift; print $a;' "æøå" æøå perl -e 'use utf8; my $a = shift; utf8::encode $a; print $a;' "test æøå" test æøå > > > PS. It seems that even Apple has problems with UTF8. In writing this > email I saved it in my drafts folder. When I came back to edit it > again, the non-ascii characters got fluffed up. Fun eh? > > > > ___ > List: Catalyst@lists.scsys.co.uk > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ > Dev site: http://dev.catalyst.perl.org/ -- Knut-Olav Hoven Systemutvikler mob: +47 986 71 700 Linpro AShttp://www.linpro.no/ signature.asc Description: This is a digitally signed message part. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Re: javascript in Catalyst using Template Toolkit
> heh. i'm picturing how that request would have gone over with the > firewall group at the last fortune 500 i worked for. yes kevin, under those circumstances you likely wouldn't do it that way. on the other hand, if you are running your app on a server that you own and do admin for, and don't have such admin problems to negotiate, it would be fine, eh? horses for courses and all that. cheers, D ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Re: javascript in Catalyst using Template Toolkit
> "DM" == Daniel McBrearty <[EMAIL PROTECTED]> writes: >> My experience is that every time I think I -can- make that >> assumption, later I end up really wishing I could deploy my app to >> a sub-URL for testing or similar. DM> If I hit that one (needing to test code on the real server while DM> an existing version runs) I typically just run a second server on DM> port 8080 or something. heh. i'm picturing how that request would have gone over with the firewall group at the last fortune 500 i worked for. if you managed to write a business case and argue that opening the port was necessary it'd still have taken two weeks to accomplish (and some random and unknown port would have ended up opened up to the wrong subnet; but i digress). besides, but what about when you want to move your application to, say, a shared apache cluster where other applications are running? or you're told that you'll be using the latest and greatest new single sign on product and you need to have your application protected but the SSO login pages & images not? and what about when you want to run a second application or -- and don't think this doesn't happen -- some capricious managedroid decides to change the URL of your application? i can tell you that developers who write code that adapts well to the shifting whims of management (and deployment architects) have a happier and more fruitful life than the other kind -- as a release engineer, i make sure that's the case. sure there are times when planning for everything that might change is too difficult or not practical or too expensive, but catalyst makes this common problem just sort of go away with almost no added effort. regardless, good luck with your app. cheers. k. -- kevin montuori ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] [OT] stupid Universal:CAN warnings in make test
please excuse my muttering to myself here. the issue seems to be that they did the bugfix with "ref" not "blessed" ... aargh. chromatic's doc does say quite clearly though. seems to be in two places in TT. the main reason i'm twittering about it is that if anyone can see that i am about to make an utter tit of myself in front of an even wider audience, they might save me from myself ... otherwise i'm going to try a patch later and risk yet another bug report on this later. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] [OT] stupid Universal:CAN warnings in make test
in fact, it's done since some time ... http://rt.cpan.org/Public/Bug/Display.html?id=25468 ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] [OT] stupid Universal:CAN warnings in make test
actually, I'm wrong. This patch has already been applied - but I see this warning for Template::Provider *and* Template::Iterator. andy's gonna love this ... if I can even work out what the problem actually *is* ... which given my lack of knowledge of TT internals will be fun ... On 12/21/07, Daniel McBrearty <[EMAIL PROTECTED]> wrote: > in fact, it's done since some time ... > > http://rt.cpan.org/Public/Bug/Display.html?id=25468 > ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] [OT] stupid Universal:CAN warnings in make test
thanks, I should have read it. the short way is to turn warnings off, the more correct is to look at what's doing it and submit bug reports ... On 12/21/07, Andy Armstrong <[EMAIL PROTECTED]> wrote: > On 21 Dec 2007, at 22:15, Daniel McBrearty wrote: > > this is really bugging me. > > > > It happens almost every time I update some modules or install cat ... > > > > "Called UNIVERSAL::CAN as a function, not a method ... at > > Template::Iterator" blah blah > > > http://search.cpan.org/dist/UNIVERSAL-can/lib/UNIVERSAL/can.pm > > ? > > -- > Andy Armstrong, Hexten > > > > > > ___ > List: Catalyst@lists.scsys.co.uk > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ > Dev site: http://dev.catalyst.perl.org/ > -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] [OT] ASP.NET MVC#
i'm not completely following the new syntax that you are proposing, so please forgive if I am wide of the mark here ... but ... IMO the existing syntax is really not *that* bad - the only mild crit I have is that Args() really means "I'm an endpoint", which it doesn't say. For me, a simple improvement would be to allow an alternative name such as "EndpointArgs" that is a bit more obvious, and keep the rest just as it is. I worry a bit that two syntaxes, achieving the same thing but looking quite different to each other, and both coexisting in docs, mailing lists, and code, are just going to add more potential confusion than they clear up. Assuming that is what would happen - that's what I gather from Zbigniew's first description. D On 12/21/07, Zbigniew Lukasiak <[EMAIL PROTECTED]> wrote: > Or maybe a better idea would be to use IsParent (or Parent) for those > actions that can have children (logical isn't it?). Then we could use > Args all the time instead of CaptureArgs (with EndPoint). > > Z. > > On Dec 20, 2007 12:31 PM, Matt S Trout <[EMAIL PROTECTED]> wrote: > > > > On Wed, Dec 19, 2007 at 02:18:17PM +, Zbigniew Lukasiak wrote: > > > On Dec 18, 2007 2:00 AM, Matt S Trout <[EMAIL PROTECTED]> wrote: > > > > On Mon, Dec 17, 2007 at 08:39:29PM +, Zbigniew Lukasiak wrote: > > > > > Yeah - some time ago I proposed to add an EndPoint attribute and get > > > > > rid of the CaptureArgs one that is not very intuitive (and use Args in > > > > > both cases). > > > > > > > > I don't remember seeing the code - if you update your patch to work > > > > against > > > > 5.80 trunk we can have a look ... > > > > > > A proof of concept implementation is in > > > Catalyst::Controller::PathPart. It replaces the attributes at parsing > > > time, I guess this would not be appropriate for the core of Catalyst. > > > I am now going to port that change into > > > lib/Catalyst/DispatchType/Chained.pm. I am not sure I'll be able to > > > do it though. > > > > Remember you can't break backcompat in the process either ... > > > > > > -- > > Matt S Trout Need help with your Catalyst or DBIx::Class > > project? > >Technical Director > > http://www.shadowcat.co.uk/catalyst/ > > Shadowcat Systems Ltd. Want a managed development or deployment platform? > > http://chainsawblues.vox.com/http://www.shadowcat.co.uk/servers/ > > > > ___ > > List: Catalyst@lists.scsys.co.uk > > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > > Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ > > Dev site: http://dev.catalyst.perl.org/ > > > > > > -- > Zbigniew Lukasiak > http://brudnopis.blogspot.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/[EMAIL PROTECTED]/ > Dev site: http://dev.catalyst.perl.org/ > -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] [OT] stupid Universal:CAN warnings in make test
On 21 Dec 2007, at 22:15, Daniel McBrearty wrote: this is really bugging me. It happens almost every time I update some modules or install cat ... "Called UNIVERSAL::CAN as a function, not a method ... at Template::Iterator" blah blah http://search.cpan.org/dist/UNIVERSAL-can/lib/UNIVERSAL/can.pm ? -- Andy Armstrong, Hexten ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] [OT] stupid Universal:CAN warnings in make test
this is really bugging me. It happens almost every time I update some modules or install cat ... "Called UNIVERSAL::CAN as a function, not a method ... at Template::Iterator" blah blah about 1000 times in a typical "make test". I did once look for what causes it, it seems to be a rather pernickity warning that pisses more people off than it helps ... is there a way to get rid of this annoyance other than forever patch the damn thing again and again? D ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] javascript in Catalyst using Template Toolkit
> > My experience is that every time I think I -can- make that assumption, later > I end up really wishing I could deploy my app to a sub-URL for testing or > similar. > > You may not have such bad luck, but I don't like to take that chance these > days :) If I hit that one (needing to test code on the real server while an existing version runs) I typically just run a second server on port 8080 or something. That makes it completely independent of the running version (as long as you make sure you use a test database) and lets you deploy at /. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Problem with Catalyst::Plugin::I18N using UTF-8
I looked at the Unicode plugin and I believe it most likely will break the integration against our LDAP backend, for example when searching for names containing characters like æøå. (OpenLDAP requires its input as UTF-8.) In addition, this is bad if your code (or templates) contains special unicode characters; which then becomes double-encoded. The Unicode plugin looks like could be useful if you are migrating old data or an old website that didn't use UTF-8 before. It is definitely not the solution for me, as it means more data processing and might introduce new bugs. As I said in my first post, the solution (which works for me) was to turn off the Decode parameter. This makes more sense to me now, since my mo/ po-files are already in UTF-8 and don't need to be converted. Right, I think there is some confusion on your part as to what is the proper way of handling unicode in perl. (The basic problem is that "perl's magic internal representation" just happens to look exactly like UTF-8 plus a magic flag. Longer description below) First off, you need to understand the difference between characters and bytes/octets "æøå" is a character string "\303\246\303\270\303\245" is a utf8 byte sequence != a string "\303\246\303\270\303\245" + UTF8 flag = "æøå" perl string From perldoc perlunicode ... What the "UTF8" flag means is that the sequence of octets in the representation of the scalar is the sequence of UTFâ8 encoded code points of the characters of a string. The "UTF8" flag being off means that each octet in this representation encodes a single character with code point 0..255 within the string. Perl's Unicode model is not to use UTF-8 until it is absolutely necessary. The problem lies in that you can have two strings of data that look the same when you print them, lets take the example you gave of "æøå". If this data comes from a source that doesn't set the UTF8 flag, the SV (scalar value - where perl internals store scalars) will have the characters of "\303\246\303\270\303\245" However since non of these code points are above 255 (they cant be as each character = one byte) perl thinks this isn't a utf8 string. Devel::Peek is a good module for this: DB<3> x $foo = "\303\246\303\270\303\245" 0 'æøå' DB<4> Dump($foo) SV = PV(0x918d08) at 0x926848 REFCNT = 1 FLAGS = (POK,pPOK) PV = 0x5ace10 "\303\246\303\270\303\245"\0 CUR = 6 LEN = 8 It "looks right", but wait - LEN = 8. Perl thinks its a string of 8 characters that our terminal just happens to print right. Compare that with: DB<6> x $bar = "\x{E6}\x{F8}\x{E5}" 0 '???' DB<7> Dump($bar) SV = PV(0x9398dc) at 0x9306b4 REFCNT = 1 FLAGS = (POK,pPOK) PV = 0x5acbf0 "\346\370\345"\0 CUR = 3 LEN = 4 Still not quite what we want... DB<10> Dump($baz = Encode::decode("utf8", $foo)) SV = PVMG(0x974e20) at 0x974168 REFCNT = 1 FLAGS = (POK,pPOK,UTF8) IV = 0 NV = 0 PV = 0x656d30 "\303\246\303\270\303\245"\0 [UTF8 "\x{e6}\x{f8}\x{e5}"] CUR = 6 LEN = 8 MAGIC = 0x6575e0 MG_VIRTUAL = &PL_vtbl_utf8 MG_TYPE = PERL_MAGIC_utf8(w) MG_LEN = 3 Right, *now* $baz is a proper unicode string that perl knows is a string of UTF8 *characters* To relate this to your problem, you are getting some of your data double encoded because the data (from the perl module you are using to access your LDAP server) is returning a byte sequence that perl doesn't know is supposed to be UTF8. The answer is to do Encode::decode("utf8", $utf8_byte_sequence) on all the data coming back from your LDAP server (or to find the right option to make the module you are using do it). Any of this make any sense? PS. It seems that even Apple has problems with UTF8. In writing this email I saved it in my drafts folder. When I came back to edit it again, the non-ascii characters got fluffed up. Fun eh? ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] More unicode problems (uri_for)
The solution to my last problem (attached) brought up a new problem regarding UTF-8. = Problem = The following code: $c->redirect( $c::uri_for( '/login', {error_msg => "Check my å"} ); ); Gives me this URL in my browser: http://localhost:3000/login?error_msg=Check+my+%C3%83%C2%A5 Which prints this on my webpage: Check my Ã¥ The content type of the webpage is UTF-8. = Possible solution = Remove line 967 from Catalyst.pm (v5.7011): (map { $_ = "$_"; # THIS ONE utf8::encode( $_ ); # using the URI::Escape pattern here so utf8 chars survive s/([^A-Za-z0-9\-_.!~*'() ])/$URI::Escape::escapes{$1}/go; s/ /+/g; "${key}=$_"; } ( ref $val eq 'ARRAY' ? @$val : $val )); = Questions = - It works as a solution to me, does it break anything for others? - Why is that line there at all? - Shouldn't URI::Escape be enough? -- Knut-Olav Hoven Systemutvikler mob: +47 986 71 700 Linpro AShttp://www.linpro.no/ --- Begin Message --- There are some problems when translating with Catalyst::Plugin::I18N using special unicode characters like "æøå". It got printed (both in console/debugging) and in web browser) as unprintable characters (displayed as "?"). Manually changing encoding in Firefox to ISO-8859-1 made it look right, but the rest of the page is using UTF-8, so this was a no-go solution for me. The solution I found to this was to change line 65 of Catalyst/Plugin/I18N.pm (version 0.06), changed the Decode attribute given to "Locale::Maketext::Simple" from 1 to 0. Any particular reason why Decode was 1? If Decode=>1 is needed for somebody, this should definitely be a configurable option. Patch attached -- Knut-Olav Hoven Systemutvikler mob: +47 986 71 700 Linpro AShttp://www.linpro.no/ Index: lib/Catalyst/Plugin/I18N.pm === --- lib/Catalyst/Plugin/I18N.pm (revisjon 390) +++ lib/Catalyst/Plugin/I18N.pm (revisjon 397) @@ -46,6 +46,22 @@ our %Lexicon = ( 'Hello Catalyst' => 'Hallo Katalysator' ); 1; +=head1 CONFIGURATION + +To override the C parameter (default to 0), set up configuration in +your MyApp.pm file like this: + + __PACKAGE__->config( +'i18n' => { +'decode'=> 1, +}, + ); + +or if using YAML configuration file: + + i18n: +decode: 1 + =head2 EXTENDED METHODS =head3 setup @@ -60,9 +76,10 @@ my $file = "$calldir.pm"; my $path = $INC{$file}; $path =~ s#\.pm$#/I18N#; +my $decode = $self->config->{'i18n'}{'decode'} ? 1 : 0; eval <<""; package $self; - import Locale::Maketext::Simple Path => '$path', Export => '_loc', Decode => 1; + import Locale::Maketext::Simple Path => '$path', Export => '_loc', Decode => $decode; if ($@) { signature.asc Description: This is a digitally signed message part. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/ --- End Message --- signature.asc Description: This is a digitally signed message part. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Problem with Catalyst::Plugin::I18N using UTF-8
On Friday 21 December 2007 20:10:28 Brian Cassidy wrote: > Knut-Olav Hoven wrote: > > That seems like an odd solution... > > > > The Decode parameter is used to decode unicode characters, while the > > Unicode plugin is encoding to unicode...? > > This tutorial was never complete, and it's getting a little bit on the > old side, but it's basically still valid: > > http://dev.catalyst.perl.org/svnweb/Catalyst/view/trunk/Catalyst-Plugin-I18 >N/lib/Catalyst/Plugin/I18N/Manual.pod > > (Note the use of the Unicode plugin) I looked at the Unicode plugin and I believe it most likely will break the integration against our LDAP backend, for example when searching for names containing characters like æøå. (OpenLDAP requires its input as UTF-8.) In addition, this is bad if your code (or templates) contains special unicode characters; which then becomes double-encoded. The Unicode plugin looks like could be useful if you are migrating old data or an old website that didn't use UTF-8 before. It is definitely not the solution for me, as it means more data processing and might introduce new bugs. As I said in my first post, the solution (which works for me) was to turn off the Decode parameter. This makes more sense to me now, since my mo/po-files are already in UTF-8 and don't need to be converted. > > -Brian > > ___ > List: Catalyst@lists.scsys.co.uk > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ > Dev site: http://dev.catalyst.perl.org/ -- Knut-Olav Hoven Systemutvikler mob: +47 986 71 700 Linpro AShttp://www.linpro.no/ signature.asc Description: This is a digitally signed message part. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] [OT] ASP.NET MVC#
Or maybe a better idea would be to use IsParent (or Parent) for those actions that can have children (logical isn't it?). Then we could use Args all the time instead of CaptureArgs (with EndPoint). Z. On Dec 20, 2007 12:31 PM, Matt S Trout <[EMAIL PROTECTED]> wrote: > > On Wed, Dec 19, 2007 at 02:18:17PM +, Zbigniew Lukasiak wrote: > > On Dec 18, 2007 2:00 AM, Matt S Trout <[EMAIL PROTECTED]> wrote: > > > On Mon, Dec 17, 2007 at 08:39:29PM +, Zbigniew Lukasiak wrote: > > > > Yeah - some time ago I proposed to add an EndPoint attribute and get > > > > rid of the CaptureArgs one that is not very intuitive (and use Args in > > > > both cases). > > > > > > I don't remember seeing the code - if you update your patch to work > > > against > > > 5.80 trunk we can have a look ... > > > > A proof of concept implementation is in > > Catalyst::Controller::PathPart. It replaces the attributes at parsing > > time, I guess this would not be appropriate for the core of Catalyst. > > I am now going to port that change into > > lib/Catalyst/DispatchType/Chained.pm. I am not sure I'll be able to > > do it though. > > Remember you can't break backcompat in the process either ... > > > -- > Matt S Trout Need help with your Catalyst or DBIx::Class project? >Technical Directorhttp://www.shadowcat.co.uk/catalyst/ > Shadowcat Systems Ltd. Want a managed development or deployment platform? > http://chainsawblues.vox.com/http://www.shadowcat.co.uk/servers/ > > ___ > List: Catalyst@lists.scsys.co.uk > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ > Dev site: http://dev.catalyst.perl.org/ > -- Zbigniew Lukasiak http://brudnopis.blogspot.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/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Problem with Catalyst::Plugin::I18N using UTF-8
Knut-Olav Hoven wrote: That seems like an odd solution... The Decode parameter is used to decode unicode characters, while the Unicode plugin is encoding to unicode...? This tutorial was never complete, and it's getting a little bit on the old side, but it's basically still valid: http://dev.catalyst.perl.org/svnweb/Catalyst/view/trunk/Catalyst-Plugin-I18N/lib/Catalyst/Plugin/I18N/Manual.pod (Note the use of the Unicode plugin) -Brian ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Problem with Catalyst::Plugin::I18N using UTF-8
On Friday 21 December 2007 19:31:09 Brian Cassidy wrote: > Knut-Olav Hoven wrote: > > There are some problems when translating with Catalyst::Plugin::I18N > > using special unicode characters like "æøå". > > > > It got printed (both in console/debugging) and in web browser) as > > unprintable characters (displayed as "?"). Manually changing encoding in > > Firefox to ISO-8859-1 made it look right, but the rest of the page is > > using UTF-8, so this was a no-go solution for me. > > > > The solution I found to this was to change line 65 of > > Catalyst/Plugin/I18N.pm (version 0.06), changed the Decode attribute > > given > > to "Locale::Maketext::Simple" from 1 to 0. > > I'm using the I18N plugin with unicode characters just fine. Your > work-around seems suspect to me. > > Are you using the Unicode plugin? If not, try adding that to the mix and > see if that makes things jive for ya. That seems like an odd solution... The Decode parameter is used to decode unicode characters, while the Unicode plugin is encoding to unicode...? > > -Brian > > ___ > List: Catalyst@lists.scsys.co.uk > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ > Dev site: http://dev.catalyst.perl.org/ -- Knut-Olav Hoven Systemutvikler mob: +47 986 71 700 Linpro AShttp://www.linpro.no/ signature.asc Description: This is a digitally signed message part. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] [RFC] Loading Plugins from lib/MyApp/Plugins
On Thu, Dec 20, 2007 at 10:21:37AM -0500, Christopher H. Laco wrote: > Christopher Laco wrote: > > I know I've been down this thread before. When writing a framework that > > generates customized Catalyst apps, it would be a whole lot easier > > (well, more proper) to add plugins in lib/MyApp/Plugins, just like we do > > with controllers/models/view, than it is to molest the MyApp.pm 'use > > Catalyst' line to include custom plugins. > > > > I'm assuming that it's just a matter of tweaking the Module::Pluggable > > search paths at the appropriate time when Cat is starting up. > > > > Is this a planned feature for 5.8? Could it be? > > Yes, I'll volunteer to put some tuits on it if need be. > > > > -=Chris > > Just for giggles this morning, I started tinkering with a > Catalyst::Plugin::PluginLoader. > > Can anyone in core tell me why things are in this particular order? > > setup { > $class->setup_plugins > $class->log->debug( "Loaded plugins:\n" . $t->draw . "\n" ); > ... > # Call plugins setup > { > no warnings qw/redefine/; > local *setup = sub { }; > $class->setup; > } > } > > > Since PluginLoader->setup is called after the Debug "loaded plugins" > output...it doesn't show the plugins just loaded by PluginLoader. > > Is there some reason these are backwords on purpose, or is that just a > bug? It appears that other things are ok Can't see a reason really, except maybe "what if we die loading a plugin", but then you'll get an error anyway. Unless somebody else objects I'd say patch it. -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical Directorhttp://www.shadowcat.co.uk/catalyst/ Shadowcat Systems Ltd. Want a managed development or deployment platform? http://chainsawblues.vox.com/http://www.shadowcat.co.uk/servers/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] javascript in Catalyst using Template Toolkit
On Thu, Dec 20, 2007 at 02:11:50PM -0500, John Romkey wrote: > Two recommendations, assuming the Javascript file isn't meant to be > modified at runtime: > > First, use an absolute path to the file in your script tag, ie: >
Re: [Catalyst] Problem with Catalyst::Plugin::I18N using UTF-8
Knut-Olav Hoven wrote: There are some problems when translating with Catalyst::Plugin::I18N using special unicode characters like "æøå". It got printed (both in console/debugging) and in web browser) as unprintable characters (displayed as "?"). Manually changing encoding in Firefox to ISO-8859-1 made it look right, but the rest of the page is using UTF-8, so this was a no-go solution for me. The solution I found to this was to change line 65 of Catalyst/Plugin/I18N.pm (version 0.06), changed the Decode attribute given to "Locale::Maketext::Simple" from 1 to 0. I'm using the I18N plugin with unicode characters just fine. Your work-around seems suspect to me. Are you using the Unicode plugin? If not, try adding that to the mix and see if that makes things jive for ya. -Brian ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Problem with Catalyst::Plugin::I18N using UTF-8
There are some problems when translating with Catalyst::Plugin::I18N using special unicode characters like "æøå". It got printed (both in console/debugging) and in web browser) as unprintable characters (displayed as "?"). Manually changing encoding in Firefox to ISO-8859-1 made it look right, but the rest of the page is using UTF-8, so this was a no-go solution for me. The solution I found to this was to change line 65 of Catalyst/Plugin/I18N.pm (version 0.06), changed the Decode attribute given to "Locale::Maketext::Simple" from 1 to 0. Any particular reason why Decode was 1? If Decode=>1 is needed for somebody, this should definitely be a configurable option. Patch attached -- Knut-Olav Hoven Systemutvikler mob: +47 986 71 700 Linpro AShttp://www.linpro.no/ Index: lib/Catalyst/Plugin/I18N.pm === --- lib/Catalyst/Plugin/I18N.pm (revisjon 390) +++ lib/Catalyst/Plugin/I18N.pm (revisjon 397) @@ -46,6 +46,22 @@ our %Lexicon = ( 'Hello Catalyst' => 'Hallo Katalysator' ); 1; +=head1 CONFIGURATION + +To override the C parameter (default to 0), set up configuration in +your MyApp.pm file like this: + + __PACKAGE__->config( +'i18n' => { +'decode'=> 1, +}, + ); + +or if using YAML configuration file: + + i18n: +decode: 1 + =head2 EXTENDED METHODS =head3 setup @@ -60,9 +76,10 @@ my $file = "$calldir.pm"; my $path = $INC{$file}; $path =~ s#\.pm$#/I18N#; +my $decode = $self->config->{'i18n'}{'decode'} ? 1 : 0; eval <<""; package $self; - import Locale::Maketext::Simple Path => '$path', Export => '_loc', Decode => 1; + import Locale::Maketext::Simple Path => '$path', Export => '_loc', Decode => $decode; if ($@) { signature.asc Description: This is a digitally signed message part. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: SV: [Catalyst] Template render problem (plugin error) - Hops-0.05application
On 22 Dec 2007, at 00:08, Peter Sørensen wrote: Thanks, I downloaded the suggested and installed with perl Makefile.PL, I got a lot of prereq from CPAN but when trying to run the application i get following error: no file specified at /usr/lib/perl5/site.Catalyst/Plugin/ Authentication/Store(Htpasswd/Backend.pm Yes, I've had this problem on my shared hosting env, but nowhere else, and I can't completely remember how I fixed it - possibly by making explicit use lib '/path/to/@inc/' calls in wiab_fcgi.pl, or maybe you don't have Config::General installed. A basic auth.text ships in the application root. Anyhow there's a working install at wiab.totaldatasolution.com which will give you enough to follow along with the code. Username and password is "test" As I can see the wiab.conf contains path_to__(auth.txt) and it is probably this is it missing or?? Regard Peter -Oprindelig meddelelse- Fra: Kieren Diment [mailto:[EMAIL PROTECTED] Sendt: 21. december 2007 13:00 Til: The elegant MVC web framework Emne: Re: [Catalyst] Template render problem (plugin error) - Hops-0.05application On 21 Dec 2007, at 22:39, Peter Sørensen wrote: Hi, I am new to Catalyst. I have just installed it and got my first very simple application to work. (Catalyst 5.7012 , perl 5.8.5) Now I'm trying to learn by example, and have downloaded the Hops-0.05 application and got this working - I thought. But when accessing it from my browser I get the following error: Where's Hops from? It sounds to me like it might be very old. I suggest having a look in the catalyst examples dir in svn for something more up to date: svn checkout http://dev.catalyst.perl.org/repos/Catalyst/trunk/ examples/ Or for something (that I wrote) which is thoroughly documented and n00b friendly (but not the best sw design work in the world - adequate, not great) http://code.google.com/p/websiteinabox/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/ [EMAIL PROTECTED]/ 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/ [EMAIL PROTECTED]/ 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/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
SV: [Catalyst] Template render problem (plugin error) - Hops-0.05application
Thanks, This solved the problem with the Hops application. Regards Peter -Oprindelig meddelelse- Fra: Moritz Onken [mailto:[EMAIL PROTECTED] Sendt: 21. december 2007 13:58 Til: The elegant MVC web framework Emne: Re: [Catalyst] Template render problem (plugin error) - Hops-0.05application try installing Template::Plugin::Class Am 21.12.2007 um 12:39 schrieb Peter Sørensen: > > Hi, > > I am new to Catalyst. I have just installed it and got my first very > simple application to work. > (Catalyst 5.7012 , perl 5.8.5) > > Now I'm trying to learn by example, and have downloaded the > Hops-0.05 application and got this working - I thought. > > But when accessing it from my browser I get the following error: > > .. > [debug] Rendering template "list" > [error] Could'nt render template "plugin error - Class: plugin not > found" > .. > > > Obviously I'm missing something. Could someone shed some light on this > and point me in the right direction? > Maybee howto get more debug output or other ways to track down the > problem. > > Regards and thanks > > Peter > > > ___ > List: Catalyst@lists.scsys.co.uk > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: > http://www.mail-archive.com/[EMAIL PROTECTED]/ > 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/[EMAIL PROTECTED]/ 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/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
SV: [Catalyst] Template render problem (plugin error) - Hops-0.05application
Thanks, I downloaded the suggested and installed with perl Makefile.PL, I got a lot of prereq from CPAN but when trying to run the application i get following error: no file specified at /usr/lib/perl5/site.Catalyst/Plugin/Authentication/Store(Htpasswd/Backend.pm As I can see the wiab.conf contains path_to__(auth.txt) and it is probably this is it missing or?? Regard Peter -Oprindelig meddelelse- Fra: Kieren Diment [mailto:[EMAIL PROTECTED] Sendt: 21. december 2007 13:00 Til: The elegant MVC web framework Emne: Re: [Catalyst] Template render problem (plugin error) - Hops-0.05application On 21 Dec 2007, at 22:39, Peter Sørensen wrote: > > Hi, > > I am new to Catalyst. I have just installed it and got my first very > simple application to work. > (Catalyst 5.7012 , perl 5.8.5) > > Now I'm trying to learn by example, and have downloaded the > Hops-0.05 application and got this working - I thought. > > But when accessing it from my browser I get the following error: > Where's Hops from? It sounds to me like it might be very old. I suggest having a look in the catalyst examples dir in svn for something more up to date: svn checkout http://dev.catalyst.perl.org/repos/Catalyst/trunk/examples/ Or for something (that I wrote) which is thoroughly documented and n00b friendly (but not the best sw design work in the world - adequate, not great) http://code.google.com/p/websiteinabox/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ 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/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Template render problem (plugin error) - Hops-0.05 application
try installing Template::Plugin::Class Am 21.12.2007 um 12:39 schrieb Peter Sørensen: Hi, I am new to Catalyst. I have just installed it and got my first very simple application to work. (Catalyst 5.7012 , perl 5.8.5) Now I'm trying to learn by example, and have downloaded the Hops-0.05 application and got this working - I thought. But when accessing it from my browser I get the following error: .. [debug] Rendering template "list" [error] Could'nt render template "plugin error - Class: plugin not found" .. Obviously I'm missing something. Could someone shed some light on this and point me in the right direction? Maybee howto get more debug output or other ways to track down the problem. Regards and thanks Peter ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ 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/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Template render problem (plugin error) - Hops-0.05 application
On 21 Dec 2007, at 22:39, Peter Sørensen wrote: Hi, I am new to Catalyst. I have just installed it and got my first very simple application to work. (Catalyst 5.7012 , perl 5.8.5) Now I'm trying to learn by example, and have downloaded the Hops-0.05 application and got this working - I thought. But when accessing it from my browser I get the following error: Where's Hops from? It sounds to me like it might be very old. I suggest having a look in the catalyst examples dir in svn for something more up to date: svn checkout http://dev.catalyst.perl.org/repos/Catalyst/trunk/examples/ Or for something (that I wrote) which is thoroughly documented and n00b friendly (but not the best sw design work in the world - adequate, not great) http://code.google.com/p/websiteinabox/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Help understanding interaction with view; application using IE7 Prototype.js
Dear List, I wondered whether anyone could shed some light on what happens during the flow of a request, there seems to be a difference in returning directly from the controller and forwarding to a view. This effect is show when using Ajax. This issue only appears in IE7, Firefox handles the response from the request fine. The situation is a s follows; I have two javascript Updater methods in a page; Method A Method B One of the ajax requests (Method A) calls a catalyst method that forwards to a Mason view the other request (Method B) calls a catalyst method that returns from the controller using: $c->response->body the controllers; Method A sub timeMason : Local { my ($self, $c) = @_; $c->stash->{template} = 'updaterPages/timeMason.mhtml'; $c->forward( $c->view('Mason') ) unless $c->response->body; } Method B sub time : Local { my ($self, $c) = @_; $c->response->body("Updater ran @ ".localtime); } The mason page root/updaterPages/timeMason.mhtml contains : <% "Updater ran @ ".localtime %> In IE7 when you run the controllers directly ie http://host/updater/time and http://host/updater/timeMason the correct output is displayed, they both work. The problem is that in IE7, when run from the Javascript Updater, only method B works the javascript fails when attempting to get the responseText from the transport (in prototype.js line: this.responseText = String.interpret(transport.responseText ). The examples I have seen using AJAX with catalyst all seem to have the controller setting the response body (method B). Is it possible to use method A? Thanks in advance Stephen ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Template render problem (plugin error) - Hops-0.05 application
Hi, I am new to Catalyst. I have just installed it and got my first very simple application to work. (Catalyst 5.7012 , perl 5.8.5) Now I'm trying to learn by example, and have downloaded the Hops-0.05 application and got this working - I thought. But when accessing it from my browser I get the following error: .. [debug] Rendering template "list" [error] Could'nt render template "plugin error - Class: plugin not found" .. Obviously I'm missing something. Could someone shed some light on this and point me in the right direction? Maybee howto get more debug output or other ways to track down the problem. Regards and thanks Peter ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/