[Catalyst] Major (for me) problem fixed!
After upgrading to 5.7, I occasionally got the following error when starting my server: $ CATALYST_DEBUG=1 perl script/blog_server.pl -r Warning: Use of require without parentheses is ambiguous at (eval 94) line 1. syntax error at (eval 94) line 2, at EOF Compilation failed in require at script/blog_server.pl line 52. This was very annoying, and since it would randomly come and go, I couldn't debug the cause. I finally decided to run the program under the Perl debugger, and immediately the cause of the problem became clear: Warning: Use of require without parentheses is ambiguous at (eval 108)[/usr/local/share/perl/5.8.8/Catalyst/Utils.pm:252] line 1. at (eval 108)[/usr/local/share/perl/5.8.8/Catalyst/Utils.pm:252] line 1 eval 'require Blog::Controller::.#Feeds;' called at /usr/local/share/perl/5.8.8/Catalyst/Utils.pm line 252 Catalyst::Utils::ensure_class_loaded('Blog::Controller::.#Feeds', 'HASH(0x9f8d004)') called at /usr/local/share/perl/5.8.8/Catalyst.pm line 1798 Catalyst::setup_components('Blog') called at /usr/local/share/perl/5.8.8/Catalyst.pm line 836 -- 8 cut 8 -- As you can see, Catalyst was trying (and failing) to load emacs' autosave files as a Controller! I don't know if emacs is widespread enough to warrant ignoring all files that are like .#[^/]+, but if you're having this problem, there's the fix. Delete all non-Controller files in your Controller folder, and you'll be very happy :) Regards, Jonathan Rockway signature.asc Description: OpenPGP digital signature ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Major (for me) problem fixed!
I complained about this quite some time ago and was told to use the restartregex option to filter that out (and scratch_file~ of course). Instead of suggesting that, I'll join in in complaining again. :) –Ashley -- On Jul 28, 2006, at 1:05 AM, Jonathan Rockway wrote: After upgrading to 5.7, I occasionally got the following error when starting my server: $ CATALYST_DEBUG=1 perl script/blog_server.pl -r Warning: Use of require without parentheses is ambiguous at (eval 94) line 1. syntax error at (eval 94) line 2, at EOF Compilation failed in require at script/blog_server.pl line 52. This was very annoying, and since it would randomly come and go, I couldn't debug the cause. I finally decided to run the program under the Perl debugger, and immediately the cause of the problem became clear: Warning: Use of require without parentheses is ambiguous at (eval 108)[/usr/local/share/perl/5.8.8/Catalyst/Utils.pm:252] line 1. at (eval 108)[/usr/local/share/perl/5.8.8/Catalyst/Utils.pm:252] line 1 eval 'require Blog::Controller::.#Feeds;' called at /usr/local/share/perl/5.8.8/Catalyst/Utils.pm line 252 Catalyst::Utils::ensure_class_loaded('Blog::Controller::.#Feeds', 'HASH(0x9f8d004)') called at /usr/local/share/perl/5.8.8/Catalyst.pm line 1798 Catalyst::setup_components('Blog') called at /usr/local/share/perl/5.8.8/Catalyst.pm line 836 -- 8 cut 8 -- As you can see, Catalyst was trying (and failing) to load emacs' autosave files as a Controller! I don't know if emacs is widespread enough to warrant ignoring all files that are like .#[^/]+, but if you're having this problem, there's the fix. Delete all non- Controller files in your Controller folder, and you'll be very happy :) Regards, Jonathan Rockway ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/ catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Major (for me) problem fixed!
Right,Catalyst used to use Module::Plugable::Fast for component autodiscoveryNow it uses Module::Pluggable::Object.This behaviour was fixed for M::P::F a while back but evidently hasn't been for M::P::O (and MPO produces a more cryptic error message too :( ). So if you're up to it, rtfs for both, make a patch for MPO and send it to the author or to RT noting that the behaviour was fixed in MPF a while back. On 28/07/06, apv [EMAIL PROTECTED] wrote: I complained about this quite some time ago and was told to use therestartregex option to filter that out (and scratch_file~ ofcourse). Instead of suggesting that, I'll join in in complaining again. :)–Ashley--On Jul 28, 2006, at 1:05 AM, Jonathan Rockway wrote: After upgrading to 5.7, I occasionally got the following error when starting my server: $ CATALYST_DEBUG=1 perl script/blog_server.pl -r Warning: Use of require without parentheses is ambiguous at (eval 94) line 1. syntax error at (eval 94) line 2, at EOF Compilation failed in require at script/blog_server.pl line 52. This was very annoying, and since it would randomly come and go, I couldn't debug the cause.I finally decided to run the program under the Perl debugger, and immediately the cause of the problem became clear: Warning: Use of require without parentheses is ambiguous at (eval 108)[/usr/local/share/perl/5.8.8/Catalyst/Utils.pm:252] line 1.at (eval 108)[/usr/local/share/perl/5.8.8/Catalyst/Utils.pm:252] line 1 eval 'require Blog::Controller::.#Feeds;' called at /usr/local/share/perl/5.8.8/Catalyst/Utils.pm line 252 Catalyst::Utils::ensure_class_loaded('Blog::Controller::.#Feeds', 'HASH(0x9f8d004)') called at /usr/local/share/perl/5.8.8/Catalyst.pm line 1798 Catalyst::setup_components('Blog') called at /usr/local/share/perl/5.8.8/Catalyst.pm line 836 -- 8 cut 8 -- As you can see, Catalyst was trying (and failing) to load emacs' autosave files as a Controller!I don't know if emacs is widespread enough to warrant ignoring all files that are like .#[^/]+, but if you're having this problem, there's the fix.Delete all non- Controller files in your Controller folder, and you'll be very happy :) Regards, Jonathan Rockway ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/ catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/___List: Catalyst@lists.rawmode.orgListinfo: http://lists.rawmode.org/mailman/listinfo/catalystSearchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] wrapping up my last couple of questions
In the last couple of days, I've submitted a couple of questions to the list, and I thought I would post a wrap-up note before starting on my next round of urgent emails. 1) DBIC::Schema::Loader on windows - fixes for my warnings and some build issues in Windows as noted on this list are percolating through CPAN as we speak. 2) Cat::Engine::HTTP run redefined warning - fixed check in to repository. 3) I asked for advice on rolling an authentication::credential. Daniel Westermann-Clark gave me the answer. I don't think I can release code, but my minimal credential plug-in started as a copy of Credential::Password, and I deconstructed from there. It makes sure that it received either a user name or a User object, and passes that to set_authenticated(). Very simple. I get the username from a request header, and pass it to login() in my Root controller. But I'm now getting some session errors relating to session, authentication and Apache. Details in another posting, when time permits. So,m aside form one show stopper, my Cat infrastructure is looking pretty good, and I'm feeling pretty chipper about it. Thanks to everyone who's helped/advised me lately. Len. -- Leonard A. Jaffe (614)213-4283 JP Morgan Chase, DTS Instrumentation Services [EMAIL PROTECTED] This transmission may contain information that is privileged, confidential, legally privileged, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by JPMorgan Chase & Co., its subsidiaries and affiliates, as applicable, for any loss or damage arising in any way from its use. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] error using session and authn plug-ins under apache
From: [EMAIL PROTECTED] When I use session and authentication together under apache, I get this D:/Perl/site/lib/Object/Signature.pm line 19 Q: Do you need Object::Signature? I don't know, maybe it's used by one of your plugins. Is there a chance that your server is running a different perl than the shell? ie; one perl might have current versions of things while the other one doesn't. I do not get this error using the myapp_server.pl server. Clearly myapp_server.pl is working much differently than other environments (at least apache). --- Rodney Broom ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] HTML::Widget styling
[Please point me to the right place if there is a better place for HTML::Widget questions] If I have a simple form of mixed elements produced in HTML::Widget, all the components of the HTML output have ID tags, and the actual INPUT elements have classes (corresponding to the type - which is actually superfluous since you can style them using something like a CSS 'input[type=submit' selector). However there is no good way of selecting labels which go with particular types of INPUT element - for example I might (and do!) wish to differently style checkbox labels to those for text elements. By default labels have no class - unless there is an error in form validation. I can't work out a good way to generically style checkbox (or select or...) labels. My CSS fu is not that wonderful, so maybe I have missed something... I have produced a hack which overloads mk_label and adds a default class to each label, but frankly its not good since it will all fall apart if there is a validation error (which overrides the label class). Any solutions or ideas? [I did wonder about hacking the HTML production to wrap every element group (ie label input element) with a div of appropriate class - but that feels messy too (and even messier to implement, I think)]. Nigel. -- [ Nigel Metheringham [EMAIL PROTECTED] ] [ - Comments in this message are my own and not ITO opinion/policy - ] ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] error using session and authn plug-ins under apache
From: [EMAIL PROTECTED] When I use session and authentication together under apache, I get this D:/Perl/site/lib/Object/Signature.pm line 19 Q: Do you need Object::Signature? I don't know, maybe it's used by one of your plugins. O::S is not my doing. I expect it's part of the session persistence voodoo. Is there a chance that your server is running a different perl than the shell? ie; one perl might have current versions of things while the other one doesn't. I suppose, but I doubt it. There's only one perl on the box. Len. This transmission may contain information that is privileged, confidential, legally privileged, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by JPMorgan Chase & Co., its subsidiaries and affiliates, as applicable, for any loss or damage arising in any way from its use. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] error using session and authn plug-ins under apache
On Fri, Jul 28, 2006 at 11:42:40 -0400, [EMAIL PROTECTED] wrote: When I use session and authentication together under apache, I get this error [error] Caught exception in engine Can't store CODE items at ..\..\lib\Storable.pm (autosplit into ..\..\lib\auto\Storble\_freeze.al) line 290, at D:/Perl/site/lib/Object/Signature.pm line 19 It sounds like the authentication plugin is somehow storing a code reference in the session (are you overriding the for_session method in your user class? That's supposed to export a simplified data structure that can be safely serialized and used to refetch the user from the store efficiently - it sounds like it's giving back a code ref). Object::Signature is used to make sure that the session is only written to the database if it changed, in order to save unnecessary IO and to eliminate possible race conditions. I do not get this error using the myapp_server.pl server. That's very odd... Please post code/configuration if you can. -- Yuval Kogman [EMAIL PROTECTED] http://nothingmuch.woobling.org 0xEBD27418 pgpNLxKiYKqcQ.pgp Description: PGP signature ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] error using session and authn plug-ins under apache
It was around 1414 EST when Yuval replied to Len: On Fri, Jul 28, 2006 at 11:42:40 -0400, [EMAIL PROTECTED] wrote: When I use session and authentication together under apache, I get this error [error] Caught exception in engine Can't store CODE items at ..\..\lib\Storable.pm (autosplit into ..\..\lib\auto\Storble\_freeze.al) line 290, at D:/Perl/site/lib/Object/Signature.pm line 19 It sounds like the authentication plugin is somehow storing a code reference in the session (are you overriding the for_session method in your user class? That's supposed to export a simplified data I am not overriding for_session. At least not intentionally. I've overridden Credential::login() so that I can pluck the user's name out of the ether. But I've done no tinkering with User. Do you think I should? structure that can be safely serialized and used to refetch the user from the store efficiently - it sounds like it's giving back a code ref). Hmm. I'll look around in my site/lib directories and see if I can spot anything. Maybe something needs upgraded and just doesn't know it. Object::Signature is used to make sure that the session is only written to the database if it changed, in order to save unnecessary IO and to eliminate possible race conditions. That's a good thing in my book. I do not get this error using the myapp_server.pl server. That's very odd... Nicely understated. Please post code/configuration if you can. Which bits would be most helpful? Len. This transmission may contain information that is privileged, confidential, legally privileged, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by JPMorgan Chase & Co., its subsidiaries and affiliates, as applicable, for any loss or damage arising in any way from its use. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Major (for me) problem fixed!
OK, I'll write a patch when I get home :) However, what should the filtering behavior be? I think the best solution would be to ignore everything that can't contain a valid perl package (Cpackage .#foo is a compile error, as is Cpackage foo~) That way vi (or kate / gedit / whatever) users get the bugfix too :) Also (in response to apv), changing the restart regex won't fix things. If your emacs crashed (or rather, you killed the X session without closing emacs first, in my case), your catalyst server won't be able to start until you cleanup the tempfiles with M-x recover-session or careful use of Crm. :) Regards, Jonathan Rockway Kieren Diment wrote: Right, Catalyst used to use Module::Plugable::Fast for component autodiscovery Now it uses Module::Pluggable::Object. This behaviour was fixed for M::P::F a while back but evidently hasn't been for M::P::O (and MPO produces a more cryptic error message too :( ). So if you're up to it, rtfs for both, make a patch for MPO and send it to the author or to RT noting that the behaviour was fixed in MPF a while back. On 28/07/06, *apv* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I complained about this quite some time ago and was told to use the restartregex option to filter that out (and scratch_file~ of course). Instead of suggesting that, I'll join in in complaining again. :) ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] error using session and authn plug-ins under apache
On 7/28/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: ### #my Authentication and session plugins ### Authentication Authentication::Store::DBIC Authentication::Credential::SiteMinder Session Session::State::Cookie Session::Store::DBIC Just a shot in the dark here, but Cat plugins are load-order-sensitive, and typically I think Session is loaded before Auth. You could try reversing those blocks as: Session Session::State::Cookie Session::Store::DBIC Authentication Authentication::Store::DBIC Authentication::Credential::SiteMinder -- Brandon ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] error using session and authn plug-ins under apache
It was around 1414 EST when Yuval replied to Len: On Fri, Jul 28, 2006 at 11:42:40 -0400, [EMAIL PROTECTED] wrote: When I use session and authentication together under apache, I get this error [error] Caught exception in engine Can't store CODE items at ..\..\lib\Storable.pm (autosplit into ..\..\lib\auto\Storble\_freeze.al) line 290, at D:/Perl/site/lib/Object/Signature.pm line 19 It sounds like the authentication plugin is somehow storing a code reference in the session (are you overriding the for_session method in your user class? That's supposed to export a simplified data So I dug around in the two modules referenced in the error message and found that: C:P:Session uses Object::Signature, which calles Storable::nfreeze, which called Storable::_freeze with a coderef parameter which _freeze is supposed to eval, and which turns out to be a c routine. By dumping my session in Root::end, I see that I have precious little in my session: __address, __created, __updated, __user, __user_store. so there must be something inside that DBIC user record (which is contains an INT id, and VARCHAR standardid name) that is tripping __freeze under apache. I'm not using session for anything else yet, and this site will have low enough traffic that not having the user record in the session won't be a steak in the heart, so I'm inclined for now to just comment out the session stuff and get on with my life. Len. This transmission may contain information that is privileged, confidential, legally privileged, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by JPMorgan Chase & Co., its subsidiaries and affiliates, as applicable, for any loss or damage arising in any way from its use. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Major (for me) problem fixed!
From: Jonathan Rockway [EMAIL PROTECTED] However, what should the filtering behavior be? From perlmod(1): All Perl module files have the extension .pm. The use operator assumes this... I suggest that only .pm files be included. --- Rodney Broom ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] C::P::Session and Object::Signature error
i'm plagued by this error on any request: Caught exception in engine not a reference at /Library/Perl/5.8.6/Object/Signature.pm line 19 this is C::P::Session calling signature() to compare session signatures. i have a running catalyst app, and sessions used to just work. but, after a dependency was upgraded (sorry, forget which one,) this error appeared and i had to hack a workaround into a local ./lib/Object/Signature.pm. afaik, i'm on the most recent version of everything from CPAN and my distros (osx and FC4.) i don't know whether to send a patch to C::P::Session or this indicates some deeper strangeness in the interdependencies between catalyst and its plugins that i might learn from. the exception in engine part especially stymies me, and the fact that i'm running latest everything and not doing anything that could remotely be considered an edge case with sessions makes me wonder why this is happening at all. has anyone else seen this? ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] C::P::Session and Object::Signature error
--- michael j talarczyk [EMAIL PROTECTED] wrote: i'm plagued by this error on any request: Caught exception in engine not a reference at /Library/Perl/5.8.6/Object/Signature.pm line 19 this is C::P::Session calling signature() to compare session signatures. i Is that Deja Vu, or Vuja De? ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] HTML::Widget styling
On 7/28/06, Bogdan Lucaciu [EMAIL PROTECTED] wrote: uhm, do attribute selectors work in IE? As of IE 6, unfortunately, not. Hopefully, IE 7 will get a little better. But don't get your hopes up. -Nilson Santos F. Jr. ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/