[Catalyst] Updated Catalyst::Authentication::Store::DBI
I created a fork on gitpan of Catalyst::Authentication::Store::DBI (C:A:S:DBI). http://github.com/EvanCarroll/Catalyst-Authentication-Store-DBI C:A:S:DBI is now Moosified á la C:A:S:DBIC it has subclassable User classes works with composite keys has updated docs and internals notes has tests for roles has more quote_identifiers where they belong has better internal notes I'm still not sure if I should use something like MooseX::Storage::Format::Storable to do from_session and for_user. Ideas? -- Evan Carroll System Lord of the Internets ___ 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] strange generated DBIC accessor name
DBIx::Class tends to pluralize relationships, so if you have a one to many relationship with a table "company_person", it will name it "company_people". Generally speaking this is also predictable :) t...@dix.cz wrote: Hello catal[yi]sters, I'm going to be crazzy about one generated accessor name: __PACKAGE__->has_many( "company_people", # I expected to be "company_persons" "Jf::Schema::Result::CompanyPerson", { "foreign.role" => "self.id" }, ); Other names seems to be predictable: __PACKAGE__->has_many( "company_addresses", "Jf::Schema::Result::CompanyAddress", { "foreign.role" => "self.id" }, ); I have no "people" pattern in my database. Did I miss something? The schema has been generated as usual: script/jf_create.pl model DB DBIC::Schema Jf::Schema create=static \ 'dbi:Pg:dbname=jf' tomas Thanx, Tomas ___ 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/ -- Ben van Staveren phone: +62 81 70777529 email: benvanstave...@gmail.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/
[Catalyst] Google Summer of Code 2010
Hey all, It's that time of the year again. Google Summer of Code is underway and Catalyst is looking for students. This is just a short blurb, but there's $4500 in it for students that participate and pass, and $500 goes to the Perl Foundation ($5000 in total). Check out http://www.perlfoundation.org/perl5/index.cgi?gsoc_2010_projects, and hop on irc.perl.org and /join #catalyst for more info. Ping people in the /topic if you're interested in participating. Thanks! -dhoss -- Devin Austin http://www.codedright.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] Empty pdf file/ using Catalyst::View::PDF::Reuse
Lupin Deterd wrote: hobbs suggest that it can be file as bug but I don't have idea how(I newbie on both Perl/Cat). Every CPAN distribution has a bug tracker linked: http://search.cpan.org/~jonallen/Catalyst-View-PDF-Reuse-0.03/ Just follow 'View/Report Bugs' 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] mod_fcgid on win32
fREW Schmidt wrote: Ok, so I may be getting somewhere with this, but I can't tell. I installed the .dll found here: http://www.fastcgi.com/dist/ and now my config looks like the following: DocumentRoot "C:/aircraft_ducting/root/" Alias /static "C:/aircraft_ducting/root/static" FastCgiServer "C:/aircraft_ducting/script/acd_fastcgi.fcgi" -processes 3 #Alias / "C:/aircraft_ducting/script/acd_fastcgi.fcgi" Alias / "C:/aircraft_ducting/script/acd_fastcgi.fcgi/" SetOutputFilter DEFLATE SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary SetHandler default-handler When I run the fastcgi script manually from the commandline it prints out our root page, which seems like a good sign. Yet when I go to host:8080 I get a 500 and the following is printed in the logs: [Thu Jan 28 21:10:07 2010] [warn] FastCGI: server "C:/aircraft_ducting/script/acd_fastcgi.fcgi" (pid 788) terminated with exit with status '0' [Thu Jan 28 21:10:07 2010] [warn] FastCGI: server "C:/aircraft_ducting/script/acd_fastcgi.fcgi" restarted (pid 944) [Thu Jan 28 21:10:12 2010] acd_fastcgi.fcgi: Use of uninitialized value $ENV{"REMOTE_ADDR"} in string ne at C:/usr/site/lib/Catalyst/Engine/CGI.pm line 61. [Thu Jan 28 21:10:12 2010] acd_fastcgi.fcgi: Use of uninitialized value $ENV{"SERVER_PORT"} in numeric eq (==) at C:/usr/site/lib/Catalyst/Engine/CGI.pm line 85. [Thu Jan 28 21:10:12 2010] acd_fastcgi.fcgi: Use of uninitialized value $host in pattern match (m//) at C:/usr/site/lib/Catalyst/Engine/CGI.pm line 136. [Thu Jan 28 21:10:12 2010] acd_fastcgi.fcgi: Use of uninitialized value $host in substitution (s///) at C:/usr/site/lib/Catalyst/Engine/CGI.pm line 185. [Thu Jan 28 21:10:12 2010] acd_fastcgi.fcgi: Use of uninitialized value $host in concatenation (.) or string at C:/usr/site/lib/Catalyst/Engine/CGI.pm line 196. [Thu Jan 28 21:10:12 2010] acd_fastcgi.fcgi: Use of uninitialized value $host in concatenation (.) or string at C:/usr/site/lib/Catalyst/Engine/CGI.pm line 204. [Thu Jan 28 21:10:12 2010] acd_fastcgi.fcgi: Use of uninitialized value in string eq at C:/usr/site/lib/Catalyst/Action/RenderView.pm line 52. [Thu Jan 28 21:10:12 2010] acd_fastcgi.fcgi: Use of uninitialized value in string eq at C:/usr/site/lib/Catalyst.pm line 1714. Any ideas on what I might try next? Not sure if this is still an issue but I'm getting the same uninitialized error, tracked it down to using either of the plugins FormValidator or FormValidator::Simple. As I don't know enough about the plugins, no one else appears to be having this issue, and prefer the nicer FormFu I'm currently refactoring to that instead, initial results are good. Alan -- fREW Schmidt http://blog.afoolishmanifesto.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/ ___ 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] FastCGI error
On Wed, Mar 10, 2010 at 9:04 AM, Steve Rippl wrote: > Hi, > > I wonder if anyone with FastCGI experience recognizes what these are about? > > (error log for my apps VirtualHost) > > [Wed Mar 10 08:14:35 2010] [error] [client 10.22.0.85] FastCGI: comm with > server "/srv/WsdSis/script/wsdsis_fastcgi.pl" aborted: idle timeout (30 > sec), referer: http://[--snip--]/sections/report/48/119813 > [Wed Mar 10 08:14:35 2010] [error] [client 10.22.0.85] FastCGI: incomplete > headers (0 bytes) received from server > "/srv/WsdSis/script/wsdsis_fastcgi.pl", referer: > http://[--snip--]/sections/report/48/119813 > [Wed Mar 10 08:14:36 2010] [error] [client 10.22.0.85] FastCGI: comm with > server "/srv/WsdSis/script/wsdsis_fastcgi.pl" aborted: idle timeout (30 > sec), referer: http://[--snip--]/sections/report/48/119813 > [Wed Mar 10 08:14:36 2010] [error] [client 10.22.0.85] FastCGI: incomplete > headers (0 bytes) received from server > "/srv/WsdSis/script/wsdsis_fastcgi.pl", referer: > http://[--snip--]/sections/report/48/119813 > > Something is taking too long?!! > > I'm using libapache2-mod-fastcgi 2.4.6.99~snap20081109 (kindly provided by > Andrew Roland) on Debian 5 > > Thanks, > Steve Rippl > > > -- > Steve Rippl > Technology Director > Woodland Public Schools > 360 225 9451 x326 > > Hi Steve, That just means that your FastCGI job hasn't sent a response within 30 seconds, and so it assumes the process is stuck. You can adjust this with the -idle-timeout option, see: http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html#FastCgiServer Although it may be better to get your report running faster. If you use DBIC, you can use QueryLog (which integrates very nicely into Catalyst) to track down slow queries. -J ___ 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] FastCGI error
Hi, I wonder if anyone with FastCGI experience recognizes what these are about? (error log for my apps VirtualHost) [Wed Mar 10 08:14:35 2010] [error] [client 10.22.0.85] FastCGI: comm with server "/srv/WsdSis/script/wsdsis_fastcgi.pl" aborted: idle timeout (30 sec), referer: http://[--snip--]/sections/report/48/119813 [Wed Mar 10 08:14:35 2010] [error] [client 10.22.0.85] FastCGI: incomplete headers (0 bytes) received from server "/srv/WsdSis/script/wsdsis_fastcgi.pl", referer: http://[--snip--]/sections/report/48/119813 [Wed Mar 10 08:14:36 2010] [error] [client 10.22.0.85] FastCGI: comm with server "/srv/WsdSis/script/wsdsis_fastcgi.pl" aborted: idle timeout (30 sec), referer: http://[--snip--]/sections/report/48/119813 [Wed Mar 10 08:14:36 2010] [error] [client 10.22.0.85] FastCGI: incomplete headers (0 bytes) received from server "/srv/WsdSis/script/wsdsis_fastcgi.pl", referer: http://[--snip--]/sections/report/48/119813 Something is taking too long?!! I'm using libapache2-mod-fastcgi 2.4.6.99~snap20081109 (kindly provided by Andrew Roland) on Debian 5 Thanks, Steve Rippl -- Steve Rippl Technology Director Woodland Public Schools 360 225 9451 x326 ___ 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] strange generated DBIC accessor name
On Wed, Mar 10, 2010 at 7:29 AM, wrote: >>> I'm going to be crazzy about one generated accessor name: >>> >>> __PACKAGE__->has_many( >>> "company_people", # I expected to be "company_persons" >>> "Jf::Schema::Result::CompanyPerson", >>> { "foreign.role" => "self.id" }, >>> ); >>> >>> I have no "people" pattern in my database. Did I miss something? >> >> People is the correct plural of person. Apparently Catalyst uses >> something fairly clever to generate the plurals for relationship names. > > Yes, that makes sense. > > I changed the name from "person" to persona to avoid that. > And than I got plural "personae" :-) > > This is apparently linguistically perfect, but I rather prefer to have > consistent (ugly) naming.. > > Does anybody knows how invoke the *_create script to avoid that? > > > thanx, > Tomas > > >> Regards, >> Denny >> >> > > This discussion really belongs on the DBIx::Class mailing list, not on the Catalyst mailing list. http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class As Frazer posted above, yes, you can override this: http://search.cpan.org/~rkitover/DBIx-Class-Schema-Loader-0.05003/lib/DBIx/Class/Schema/Loader/Base.pm#inflect_plural -J ___ 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] strange generated DBIC accessor name
I'm going to be crazzy about one generated accessor name: __PACKAGE__->has_many( "company_people", # I expected to be "company_persons" "Jf::Schema::Result::CompanyPerson", { "foreign.role" => "self.id" }, ); I have no "people" pattern in my database. Did I miss something? People is the correct plural of person. Apparently Catalyst uses something fairly clever to generate the plurals for relationship names. Yes, that makes sense. I changed the name from "person" to persona to avoid that. And than I got plural "personae" :-) This is apparently linguistically perfect, but I rather prefer to have consistent (ugly) naming.. Does anybody knows how invoke the *_create script to avoid that? thanx, Tomas Regards, Denny ___ 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] strange generated DBIC accessor name
On Wed, 2010-03-10 at 14:15 +0100, t...@dix.cz wrote: > Hello catal[yi]sters, > > I'm going to be crazzy about one generated accessor name: > > __PACKAGE__->has_many( >"company_people", # I expected to be "company_persons" >"Jf::Schema::Result::CompanyPerson", >{ "foreign.role" => "self.id" }, > ); > > I have no "people" pattern in my database. Did I miss something? People is the correct plural of person. Apparently Catalyst uses something fairly clever to generate the plurals for relationship names. Regards, Denny 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/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] strange generated DBIC accessor name
The plural forms of autogenerated relationships are handle by Lingua::EN::Inflect (I think), and that module will give the plural of 'person' as 'people' Overriding the defaults is documented here: http://search.cpan.org/~rkitover/DBIx-Class-Schema-Loader-0.05003/lib/DBIx/Class/Schema/Loader/Base.pm#inflect_plural f On Wed, Mar 10, 2010 at 1:15 PM, wrote: > > Hello catal[yi]sters, > > I'm going to be crazzy about one generated accessor name: > > __PACKAGE__->has_many( > "company_people", # I expected to be "company_persons" > "Jf::Schema::Result::CompanyPerson", > { "foreign.role" => "self.id" }, > ); > > Other names seems to be predictable: > > __PACKAGE__->has_many( > "company_addresses", > "Jf::Schema::Result::CompanyAddress", > { "foreign.role" => "self.id" }, > ); > > > I have no "people" pattern in my database. Did I miss something? > > The schema has been generated as usual: > > script/jf_create.pl model DB DBIC::Schema Jf::Schema create=static \ > 'dbi:Pg:dbname=jf' tomas > > Thanx, > Tomas > > ___ > 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] strange generated DBIC accessor name
Hello catal[yi]sters, I'm going to be crazzy about one generated accessor name: __PACKAGE__->has_many( "company_people", # I expected to be "company_persons" "Jf::Schema::Result::CompanyPerson", { "foreign.role" => "self.id" }, ); Other names seems to be predictable: __PACKAGE__->has_many( "company_addresses", "Jf::Schema::Result::CompanyAddress", { "foreign.role" => "self.id" }, ); I have no "people" pattern in my database. Did I miss something? The schema has been generated as usual: script/jf_create.pl model DB DBIC::Schema Jf::Schema create=static \ 'dbi:Pg:dbname=jf' tomas Thanx, Tomas ___ 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] Empty pdf file/ using Catalyst::View::PDF::Reuse
On Wed, Mar 10, 2010 at 1:36 PM, Charlie Garrison wrote: > Good afternoon, > > On 6/03/10 at 4:51 PM +0800, Lupin Deterd wrote: > >> I'm using View::PDF::Reuse to create/generate pdf, and though it >> successfully create one but it's empty, following is code/template. >> -- template/receipt.tt2 -- >> >> [% pdf.prFont('Helvetica-Bold') %] >> [% pdf.prFontSize(50) %] >> >> >> [% y = 500 %] >> [% FOREACH item IN list %] >> [% pdf.prText(100,y,item) %] >> [% y = y - 13 %] >> [% END %] > > Try printing something other than `item`, eg. just a simple scalar "test > value", to ensure you're not simply printing blank values. > > Also, try ending with pdf.prPage(). I was having problems with blank PDFs > and that may have fixed it; I can't recall exactly, I tried heaps of methods > before getting it all working right with multi-page PDFs. > > > Charlie > > -- > Ꮚ Charlie Garrison ♊ > 〠 PO Box 141, Windsor, NSW 2756, Australia > > O< ascii ribbon campaign - stop html mail - www.asciiribbon.org > http://www.ietf.org/rfc/rfc1855.txt > > ___ > 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/ > Thank you for all the helpful replies, I now have a working C::V::P::R, it produced a pdf file with contents. I was able to received help from hobbs on #catalyst, the root cause of problem is that C::V::P::R produces the pdf file even it cannot find the template files, hobbs suggest that it can be file as bug but I don't have idea how(I newbie on both Perl/Cat). Anyway both C::V::P::R and C::V::PDF::API2 has the same outcome it will produce empty pdf file even it can't find the template. e.g on MyApp.pm: __PACKAGE__->config('View::PDF::Reuse' => { INCLUDE_PATH => __PACKAGE__->path_to('root','templates') # this will produce empty pdf }); __PACKAGE__->path_to('root','src') # after I added this it works. on Controller: { $c->stash->{list} = ['one', 'two', 'three', 'four']; $c->stash->{pdf_disposition} = 'attachment'; $c->stash->{pdf_filename}= 'receipt.pdf'; $c->stash->{pdf_template}= 'order/receipt.tt2'; $c->detach( $c->view('PDF::Reuse') ); } actual path of template files, in this case receipt.tt2: root/src/order/receipt.tt2 regards, lupin ___ 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/