Re: [Catalyst] Re: Wrong Content-Length value
nothing? :-/ Am 04.10.2010 10:16, schrieb Felix Antonius Wilhelm Ostmann: It there a plan to change this error? Am 29.09.2010 06:39, schrieb Aristotle Pagaltzis: * Bill Moseley mose...@hank.org [2010-09-08 23:15]: Shouldn't that just return 411, 413, or just a 400? Returning 411 is indeed exactly what the server should do. (413 is wrong. 400 is fine but not as helpful.) The server should definitely not throw an error. It shouldn’t even log a warning, because this has nothing to do with what the server did. All it is is a client being silly. Regards, -- Mit freundlichen Grüßen Felix Antonius Wilhelm Ostmann --- Websuche Search Technology GmbH Co. KG Martinistraße 3, D-49080 Osnabrück, Germany --- Tel.: +49 541 40666-0, Fax: +49 541 40666-22 Email: i...@websuche.de, Web: www.websuche.de --- AG Osnabrück - HRA 200252, Ust-IdNr.: DE814737310 --- Komplementärin: Websuche Search Technology Verwaltungs GmbH AG Osnabrück - HRB 200359, Geschäftsführer: Ansas Meyer --- ___ 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] Re: Wrong Content-Length value
It there a plan to change this error? Am 29.09.2010 06:39, schrieb Aristotle Pagaltzis: * Bill Moseley mose...@hank.org [2010-09-08 23:15]: Shouldn't that just return 411, 413, or just a 400? Returning 411 is indeed exactly what the server should do. (413 is wrong. 400 is fine but not as helpful.) The server should definitely not throw an error. It shouldn’t even log a warning, because this has nothing to do with what the server did. All it is is a client being silly. Regards, -- Mit freundlichen Grüßen Felix Antonius Wilhelm Ostmann --- Websuche Search Technology GmbH Co. KG Martinistraße 3, D-49080 Osnabrück, Germany --- Tel.: +49 541 40666-0, Fax: +49 541 40666-22 Email: i...@websuche.de, Web: www.websuche.de --- AG Osnabrück - HRA 200252, Ust-IdNr.: DE814737310 --- Komplementärin: Websuche Search Technology Verwaltungs GmbH AG Osnabrück - HRB 200359, Geschäftsführer: Ansas Meyer --- ___ 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] Re: Wrong Content-Length value
Am 14.09.2010 01:02, schrieb Bill Moseley: I need a smarter system where the logs get filtered by an external process that can be updated dynamically with filters. After I see 100 similar messages I can probably afford to suppress that message so other more important messages don't get lost in the noise. Anyone have a system that does something like that? We search exactly the same! Someone told me that this is a watchdog, but i dont find anything usefull. -- Mit freundlichen Grüßen Felix Antonius Wilhelm Ostmann --- Websuche Search Technology GmbH Co. KG Martinistraße 3, D-49080 Osnabrück, Germany --- Tel.: +49 541 40666-0, Fax: +49 541 40666-22 Email: i...@websuche.de, Web: www.websuche.de --- AG Osnabrück - HRA 200252, Ust-IdNr.: DE814737310 --- Komplementärin: Websuche Search Technology Verwaltungs GmbH AG Osnabrück - HRB 200359, Geschäftsführer: Ansas Meyer --- ___ 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] Wrong Content-Length value
see here: https://rt.cpan.org/Public/Bug/Display.html?id=53226 Am 09.09.2010 02:03, schrieb Nicholas Wehr: agree - seems to warrant more of a 'warn' than 'error'. On Wed, Sep 8, 2010 at 4:59 PM, Bill Moseley mose...@hank.org mailto:mose...@hank.org wrote: On Wed, Sep 8, 2010 at 4:13 PM, Nicholas Wehr catal...@bionikchickens.com mailto:catal...@bionikchickens.com wrote: okay - in this context I can understand your original message. I think catalyst is behaving okay. In your example, the client is disconnected so it cannot receive a response code. in my test telnet where I ran your example, I fed more data in than was expected - but since I left the client connected I got a response. the server went ahead and detected the content-length and failed gracefully, though cryptically... Correct, because it only checks: if ( $remaining 0 ) { Not sure why it's ok for the Content-Length to be less than the actual content and not the other way around. Regardless, my question was just is this the level of an error? Do we really care if a request is disconnected? I can downgrade the message to a warn in my logging code to avoid getting emails about it every few hours. -- Bill Moseley mose...@hank.org mailto:mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk mailto:Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ -- Mit freundlichen Grüßen Felix Antonius Wilhelm Ostmann --- Websuche Search Technology GmbH Co. KG Martinistraße 3, D-49080 Osnabrück, Germany --- Tel.: +49 541 40666-0, Fax: +49 541 40666-22 Email: i...@websuche.de, Web: www.websuche.de --- AG Osnabrück - HRA 200252, Ust-IdNr.: DE814737310 --- Komplementärin: Websuche Search Technology Verwaltungs GmbH AG Osnabrück - HRB 200359, Geschäftsführer: Ansas Meyer --- ___ 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] Wrong Content-Length value
We have exactly the same problem. Every error triggers emails to the dev-team. And this occure ~20 times a day. Perhaps it is not paranoid and a simple 410 (or similar) will be a better answer without sending errors to the app? Am 09.09.2010 01:59, schrieb Bill Moseley: On Wed, Sep 8, 2010 at 4:13 PM, Nicholas Wehr catal...@bionikchickens.com mailto:catal...@bionikchickens.com wrote: okay - in this context I can understand your original message. I think catalyst is behaving okay. In your example, the client is disconnected so it cannot receive a response code. in my test telnet where I ran your example, I fed more data in than was expected - but since I left the client connected I got a response. the server went ahead and detected the content-length and failed gracefully, though cryptically... Correct, because it only checks: if ( $remaining 0 ) { Not sure why it's ok for the Content-Length to be less than the actual content and not the other way around. Regardless, my question was just is this the level of an error? Do we really care if a request is disconnected? I can downgrade the message to a warn in my logging code to avoid getting emails about it every few hours. -- Bill Moseley mose...@hank.org mailto:mose...@hank.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/ -- Mit freundlichen Grüßen Felix Antonius Wilhelm Ostmann --- Websuche Search Technology GmbH Co. KG Martinistraße 3, D-49080 Osnabrück, Germany --- Tel.: +49 541 40666-0, Fax: +49 541 40666-22 Email: i...@websuche.de, Web: www.websuche.de --- AG Osnabrück - HRA 200252, Ust-IdNr.: DE814737310 --- Komplementärin: Websuche Search Technology Verwaltungs GmbH AG Osnabrück - HRB 200359, Geschäftsführer: Ansas Meyer --- ___ 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] Which C::View::PDF should I use?
We use simple View::TT and then a Filter: [%- USE Latex; FILTER latex(pdf) -%] Its perfekt! Tomas Doran schrieb: On 5 Mar 2010, at 05:38, Charlie Garrison wrote: I'm not looking to create PDFs from code, I'll be using an existing PDF and replacing values. And both C::V::P::Reuse C::V::P::API2 seem to handle that in effectively the same way. Yeah, they're both basically just wrappers.. PDF::Reuse is supposed to make it easier to reuse PDFs, whereas API2 is more powerful (and more cryptic :).. They're both being used successfully by people as far as I know, so pick whichever one appeals most :) 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/ -- Mit freundlichen Grüßen Felix Antonius Wilhelm Ostmann --- Websuche Search Technology GmbH Co. KG Martinistraße 3, D-49080 Osnabrück, Germany --- Tel.: +49 541 40666-0, Fax: +49 541 40666-22 Email: i...@websuche.de, Web: www.websuche.de --- AG Osnabrück - HRA 200252, Ust-IdNr.: DE814737310 --- Komplementärin: Websuche Search Technology Verwaltungs GmbH AG Osnabrück - HRB 200359, Geschäftsführer: Ansas Meyer --- ___ 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] Which C::View::PDF should I use?
Charlie Garrison schrieb: I like that conceptually, but just to be clear, that is latex code being converted to PDF, correct? Yes, you must write latex ... this do always my coworkers for me ;) -- Mit freundlichen Grüßen Felix Antonius Wilhelm Ostmann --- Websuche Search Technology GmbH Co. KG Martinistraße 3, D-49080 Osnabrück, Germany --- Tel.: +49 541 40666-0, Fax: +49 541 40666-22 Email: i...@websuche.de, Web: www.websuche.de --- AG Osnabrück - HRA 200252, Ust-IdNr.: DE814737310 --- Komplementärin: Websuche Search Technology Verwaltungs GmbH AG Osnabrück - HRB 200359, Geschäftsführer: Ansas Meyer --- ___ 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] [ANNOUNCE] Catalyst-Runtime 5.80016
Oleg Kostyuk schrieb: 2009/12/14 Alexander Hartmaier alexander.hartma...@t-systems.at: All app errors result in this cat error with the new version for me: [error] Caught exception in engine Can't use string (508706d1a94648443fa31ffc8b2b5ccb) as a HASH ref while strict refs in use at /home/ahartmai/perl5/lib/perl5/Catalyst/Engine.pm line 117. Try update scripts with catalyst.pl -scripts -force YourAppName, I had similar issue. Same problem here and update did not help. Only occure after errors in the app. -- Sincerely yours, Oleg Kostyuk (CUB-UANIC) ___ 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/ -- Mit freundlichen Grüßen Felix Antonius Wilhelm Ostmann -- Websuche Search Technology GmbH Co. KG Martinistraße 3 - D-49080 Osnabrück - Germany Tel.: +49 541 40666-0 - Fax:+49 541 40666-22 Email: i...@websuche.de - Website: www.websuche.de -- AG Osnabrück - HRA 200252 - Ust-Ident: DE814737310 Komplementärin: Websuche Search Technology Verwaltungs GmbH - AG Osnabrück - HRB 200359 Geschäftsführer: Diplom Kaufmann Martin Steinkamp -- ___ 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] Where am I? ;-)
I think more interesting is the question about: which action can the user visit? With different roles not every user could visit /admin, but it would be great to know that while building the navigation/links. And only configurate that at one point! sub admin :Local :ACL('role:admin') {...} And than the question: $self-action_for('admin')-can_visit or similar. Exists something like that? Currently i build with Authorization::ACL the deny/access rules and in every template i make a check for the rules needed for a link. And i cant use one configuration :-/ Jens Schwarz schrieb: Hi, with this somewhat philosophic question, I want to know, how a Controller knows, which of its action is currently active (p.ex. displayed to the user). And a similar question: How does the root controller know what other controllers are available in the app? Thanks Jens -- Mit freundlichen Grüßen Felix Antonius Wilhelm Ostmann -- Websuche Search Technology GmbH Co. KG Martinistraße 3 - D-49080 Osnabrück - Germany Tel.: +49 541 40666-0 - Fax:+49 541 40666-22 Email: i...@websuche.de - Website: www.websuche.de -- AG Osnabrück - HRA 200252 - Ust-Ident: DE814737310 Komplementärin: Websuche Search Technology Verwaltungs GmbH - AG Osnabrück - HRB 200359 Geschäftsführer: Diplom Kaufmann Martin Steinkamp -- ___ 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] [Announce] Catalyst::View::PDF::Reuse released
JJ schrieb: Hi, I've just released Catalyst::View::PDF::Reuse to CPAN. [1] This is a module we developed at Penny's Arcade [2] to produce receipts and shipping labels - I gave a lighting talk about it [3] at Milton Keynes Perl Mongers which went down well, so here it is for everyone to use. The purpose of the module is to allow PDF files to be created from Template Toolkit so that nothing needs to be hard-coded in your View, the layout can all be controlled via templates. When using View::PDF::Reuse, TT is given a 'pdf' object which has methods corresponding to all the functions of PDF::Reuse. So by taking advantage of PDF::Reuse's [4] ability to modify existing PDF documents (such as a blank order form created in Word), it becomes possible to generate quite complex PDF files without writing much code. As an example, this is all you need in your controller (having already stashed an 'order' object): $c-stash-{pdf_template} = 'order_pdf.tt'; $c-forward('View::PDF::Reuse'); then the layout commands are in order_pdf.tt, allowing all of TT's facilities - loops, filters, and so on - to be used: [% pdf.prForm('customer_receipt.pdf') %] [% pdf.prText(123,643,order.number) %] [% pdf.prText(299,643,order.date) %] If anyone has any suggestions for improvement, please let me know. We dont use direct pdf anymore ... LaTeX! and then convert to pdf works very good! Cheers, JJ [1] http://search.cpan.org/dist/Catalyst-View-PDF-Reuse [2] http://www.pennysarcade.co.uk [3] http://www.pennysarcade.co.uk/files/Creating_PDF_files_with_Catalyst.pdf [4] http://search.cpan.org/dist/PDF-Reuse -- Mit freundlichen Grüßen Felix Antonius Wilhelm Ostmann -- Websuche Search Technology GmbH Co. KG Martinistraße 3 - D-49080 Osnabrück - Germany Tel.: +49 541 40666-0 - Fax:+49 541 40666-22 Email: i...@websuche.de - Website: www.websuche.de -- AG Osnabrück - HRA 200252 - Ust-Ident: DE814737310 Komplementärin: Websuche Search Technology Verwaltungs GmbH - AG Osnabrück - HRB 200359 Geschäftsführer: Diplom Kaufmann Martin Steinkamp -- ___ 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] now() in insert
And DateTime-now give you the time from the server where your script is running and SQL now() gives you the time from the database-server! Lars Balker Rasmussen schrieb: On Fri, Feb 6, 2009 at 5:40 PM, Devin Austin devin.aus...@gmail.com wrote: On Fri, Feb 6, 2009 at 4:45 AM, Christian Lackas christ...@lackas.net wrote: dt = \'now()' DateTime also has a -now method. Careful now, they may not be identical: % perl -MDateTime -E 'say DateTime-now' 2009-02-06T16:47:48 postgresql= select now(); now --- 2009-02-06 17:48:00.240287+01 No timezone in DateTime unless you explicitly ask for it. ___ 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/ -- Mit freundlichen Grüßen Felix Antonius Wilhelm Ostmann -- Websuche Search Technology GmbH Co. KG Martinistraße 3 - D-49080 Osnabrück - Germany Tel.: +49 541 40666-0 - Fax:+49 541 40666-22 Email: i...@websuche.de - Website: www.websuche.de -- AG Osnabrück - HRA 200252 - Ust-Ident: DE814737310 Komplementärin: Websuche Search Technology Verwaltungs GmbH - AG Osnabrück - HRB 200359 Geschäftsführer: Diplom Kaufmann Martin Steinkamp -- ___ 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] check_user_roles [ $user ], @roles ?
From the code: if ( Scalar::Util::blessed( $roles[0] ) $roles[0]-isa(Catalyst::Authentication::User) ) { $user = shift @roles; } $user ||= $c-user; unless ( $user ) { Catalyst::Exception-throw( No logged in user, and none supplied as argument); } Catalyst::Exception-throw(User does not support roles) unless $user-supports(qw/roles/); i think you can give a string ... you must load the user into a user-object fit for the Authorization::Roles Jens Schwarz schrieb: Hi *, in my Catalyst app I use $c-check_user_roles(qw/Admin/) to determine, if the currently logged in user is part of the Admin role. Works fine. Now I want to check if _another_ (currently _not_ logged in user) is part of the Admin role. I read the documentation of Catalyst::Plugin::Authorization::Roles and found that check_user_roles can optionally take $user as additional parameter. But it does not work as I suspected: With ... $c-log-info( . $c-check_user_roles( some_other_user , qw/Admin/ )); ... Catalyst debug just gives me ... [debug] Role denied: some_other_user, Admin [info] ... where I expected something like ... [info] 1 some_other_user is a username string, in the column username of my user table. myapp/myapp.conf ist setup accordingly (i.e.: user_class myapp::user and id_field username). What am I doing wrong? Jens -- Mit freundlichen Grüßen Felix Antonius Wilhelm Ostmann -- Websuche Search Technology GmbH Co. KG Martinistraße 3 - D-49080 Osnabrück - Germany Tel.: +49 541 40666-0 - Fax:+49 541 40666-22 Email: i...@websuche.de - Website: www.websuche.de -- AG Osnabrück - HRA 200252 - Ust-Ident: DE814737310 Komplementärin: Websuche Search Technology Verwaltungs GmbH - AG Osnabrück - HRB 200359 Geschäftsführer: Diplom Kaufmann Martin Steinkamp -- ___ 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] check_user_roles [ $user ], @roles ?
Eden Cardim schrieb: On Wed, Feb 4, 2009 at 10:50 AM, Felix Antonius Wilhelm Ostmann ostm...@websuche.de wrote: From the code: if ( Scalar::Util::blessed( $roles[0] ) $roles[0]-isa(Catalyst::Authentication::User) ) { $user = shift @roles; } $user ||= $c-user; That particular bit means you need to feed it a blessed scalar, namely, *an object*. i think you can give a string ... you must load the user into a user-object fit for the Authorization::Roles uh, that should be a can't give a string :( damn! Not if you want it to DTRT. -- Mit freundlichen Grüßen Felix Antonius Wilhelm Ostmann -- Websuche Search Technology GmbH Co. KG Martinistraße 3 - D-49080 Osnabrück - Germany Tel.: +49 541 40666-0 - Fax:+49 541 40666-22 Email: i...@websuche.de - Website: www.websuche.de -- AG Osnabrück - HRA 200252 - Ust-Ident: DE814737310 Komplementärin: Websuche Search Technology Verwaltungs GmbH - AG Osnabrück - HRB 200359 Geschäftsführer: Diplom Kaufmann Martin Steinkamp -- ___ 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] Proper ngettext with Catalyst
i run into the same problem with german phrases [quant,_1,message has,messages have] been sent. but in german: singular: Es wurde 1 Nachricht gesendet. plural: Es wurden 10 Nachrichten gesendet. So i cant build that with normal quant ... and i was thinking about a quantf :) Es [quantf,_1,wurde %d Nachricht,wurden %d Nachrichten] gesendet. That would also fit for other languages where words get shuffled for different counts, right? And you can use quantf only in that languages that need that. Others can still use normal quant. And with the zero-Form, i think in every language it is possible to say it with the number and dont build a new phrase. Sure, it will be more correct if you say: I haven't seen any boy, but I have seen 0 boys. is also correct and will work perfect. J. Shirley schrieb: On Sun, Feb 1, 2009 at 1:27 PM, Octavian Rasnita orasn...@gmail.com wrote: From: Kieren Diment dim...@gmail.com In indonesian, to pluralise you just say the word twice, or in writing put a 2 after it. I have two apples: Saya ada dua appel appel. or: Saya ada dua appel2 Saya ada [quant,_1,appel,appel appel]. But it doesn't do a perfect translation this way, because instead of dua it just puts 2, which is not very nice in some languages. For example, in Romanian some numerals depend if the noun is masculine or feminine: 1 is unu for masculine and una for feminine nouns. 2 is doi for masculin and doua for feminine nouns. And it also depends for 21, 22, 31, 32, and so on, but these bigger numbers are usually written as numbers because they are too longer otherwise. For 1 and 2 however, in many cases they are written as words because it is much clear. Another problem is the case of 0 because in English is easy but in other languages the structure of the sentence is totally different. For example: I have seen 1 boy. I have seen 2 boys. I have seen no boys. But in Romanian it should be: Am vazut 1 baiat. Am vazut 2 baieti. Nu am vazut nici un baiat. Of course, in English works but it is not very nice either. It should have been I haven't seen any boy or something like that. Octavian All of this just makes me feel sane in my choice to organize my IDs using generic stubs if they have quantitites, as well as having more friendly apps: [% IF banana_count; c.loc(Banana Count, [ banana_count ]); ELSE; c.loc(I have no bananas); END %] More long-winded, but I like being able to have special branching if there is an absence of things (it's also a good moment to invite the user to participate more in the site) -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/ -- Mit freundlichen Grüßen Felix Antonius Wilhelm Ostmann -- Websuche Search Technology GmbH Co. KG Martinistraße 3 - D-49080 Osnabrück - Germany Tel.: +49 541 40666-0 - Fax:+49 541 40666-22 Email: i...@websuche.de - Website: www.websuche.de -- AG Osnabrück - HRA 200252 - Ust-Ident: DE814737310 Komplementärin: Websuche Search Technology Verwaltungs GmbH - AG Osnabrück - HRB 200359 Geschäftsführer: Diplom Kaufmann Martin Steinkamp -- ___ 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] DBIx::Class method, update_or_create_related - it tries to populate the primary key value of the related object
perhaps i have the same problem. I already send a patch to the IRC with a test-case. Can you write a short test too? [EMAIL PROTECTED] schrieb: hello, all, I am trying to use DBIx::Class method, update_or_create_related to cut down the amount of code I have. My code has happily worked with 1) me manually doing a search (with find) to see if an object in question exists or not. If it doesn't, I will issue a new/create . Else, the find will give out the object, I perform whatever I need to perform on the attributes and update it. 2) the database table of the related object has a nice sequence set up for its primary key, ID. Now, when I tried to use update_or_create_related, the code actually produces an error for which the ID attribute in the SQL for INSERT is null and hence, cannot be inserted to the database engine for reason that a primary key attribute value can never be NULL. It's fair up there but I just do not know why is DBIX::Class even bothering to put the primary key value, ID into the dynamic SQL that it uses to insert the entry into the database when there's already a sequence declared for it Help!! K. akimoto - it tries to populate the primary key value of the related object ___ 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/ -- Mit freundlichen Grüßen Felix Antonius Wilhelm Ostmann -- Websuche Search Technology GmbH Co. KG Martinistraße 3 - D-49080 Osnabrück - Germany Tel.: +49 541 40666-0 - Fax:+49 541 40666-22 Email: [EMAIL PROTECTED] - Website: www.websuche.de -- AG Osnabrück - HRA 200252 - Ust-Ident: DE814737310 Komplementärin: Websuche Search Technology Verwaltungs GmbH - AG Osnabrück - HRB 200359 Geschäftsführer: Diplom Kaufmann Martin Steinkamp -- ___ 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] TT custom virtual methods available to all pages.
i love such liddle funktions as FILTER :) in View::TT __PACKAGE__-config( { CATALYST_VAR = 'catalyst', ... FILTERS = { yesno = sub { $_[0] ? 'yes' : 'no'; }, onoff = sub { $_[0] ? 'on' : 'off'; }, }, }, ); so i can write in the template Newsletter: [% user.newsletter | yesno %] or your mk_hash: [% somedata | mk_hash %] Rajeev Cyrus schrieb: Greetings. One of my TT pages required some massaging of data that I decided to do via referencing a subroutine in a template variable, eg: $c-stash-{mk_hash} = \mk_hash; I would like to use this stashed variable on all of my templates so my question is: Where is the best place to initialize and set this variable? Where should i declare the mk_hash method? Is there some way I can configure catalyst to set certain template variables when the application starts? Thanks! -Rajeev Cyrus ___ 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/ -- Mit freundlichen Grüßen Felix Antonius Wilhelm Ostmann -- Websuche Search Technology GmbH Co. KG Martinistraße 3 - D-49080 Osnabrück - Germany Tel.: +49 541 40666-0 - Fax:+49 541 40666-22 Email: [EMAIL PROTECTED] - Website: www.websuche.de -- AG Osnabrück - HRA 200252 - Ust-Ident: DE814737310 Komplementärin: Websuche Search Technology Verwaltungs GmbH - AG Osnabrück - HRB 200359 Geschäftsführer: Diplom Kaufmann Martin Steinkamp -- ___ 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] On authentication again
you are outdated ;) someone in the channel say we should use: 'Plugin::Authentication' = { ... } Chisel Wright schrieb: On Thu, Mar 06, 2008 at 07:06:55PM +0300, Alex Povolotsky wrote: Hello! Maybe someone could provide the complete example of auth system with MODERN Catalyst::Plugin::Authentication? I mean, with database, Model and proper config. I have _no idea_ if I'm using old, new or pre-historic authentication, but this it want I cave in myapp.yml: # authentiation settings; perldoc # Catalyst::Plugin::Authentication::Store::DBIC authentication: dbic: user_class: 'Parley::Model::ParleyDB::Authentication' user_field: 'username' password_field: 'password' password_type: 'hashed' password_hash_type: 'MD5' -- Mit freundlichen Grüßen Felix Antonius Wilhelm Ostmann -- Websuche Search Technology GmbH Co. KG Martinistraße 3 - D-49080 Osnabrück - Germany Tel.: +49 541 40666-0 - Fax:+49 541 40666-22 Email: [EMAIL PROTECTED] - Website: www.websuche.de -- AG Osnabrück - HRA 200252 - Ust-Ident: DE814737310 Komplementärin: Websuche Search Technology Verwaltungs GmbH - AG Osnabrück - HRB 200359 Geschäftsführer: Diplom Kaufmann Martin Steinkamp -- ___ 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] On authentication
i asked for that yesterday in the channel ... you must install Catalyst::Authentication::Store::DBIx::Class (without Plugin) somewhere in die manual you cant read about it ... i dont find it too ;) Alex Povolotsky schrieb: Hello! Comparing tutorial/book and perldoc Catalyst::Plugin::Authentication, I've found completely different ways to configure authentication/authorization. Looks like Catalyst::Plugin::Authentication is much richer, but much worse documented and, say, there is no Catalyst::Plugin::Authentication::Store::DBIx::Class mentioned in C::P::A manual. Is tutorial/book way obsoleted? If yes, where can I find better explanation of C::P::A? Alex. ___ 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/ -- Mit freundlichen Grüßen Felix Antonius Wilhelm Ostmann -- Websuche Search Technology GmbH Co. KG Martinistraße 3 - D-49080 Osnabrück - Germany Tel.: +49 541 40666-0 - Fax:+49 541 40666-22 Email: [EMAIL PROTECTED] - Website: www.websuche.de -- AG Osnabrück - HRA 200252 - Ust-Ident: DE814737310 Komplementärin: Websuche Search Technology Verwaltungs GmbH - AG Osnabrück - HRB 200359 Geschäftsführer: Diplom Kaufmann Martin Steinkamp -- ___ 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] Why use external FastCGI apps?
Perhaps someone can help me with my problem and external FastCGI :-/ i have a fastcgi start/stop script (dont know anymore from which howto), but i cant make fastcgi_server.sh restart he say he stoped and started properly, but after that the socket is broken?!?! i always need to stop, wait 5 seconds and start then :-/ is there another start/stop daemon out there? Matt S Trout schrieb: On Thu, Feb 07, 2008 at 11:46:36AM -0500, Matt Pitts wrote: I just got advise from mst to not use mod_fcgid in production because it doesn't support external fastcgi and this is the way to do HA apps. I wanted to ask some questions and hear some arguments. I know there's some existing traffic on the list about this, but I thought some fresh info would be nice. We're currently running a Cat app under mod_fcgid in production that handles about a million hits a day b/t Cat and static files. Why did we chose mod_fcgid? Well, I tried playing around with mod_fastcgi for awhile and had problems getting the config straight - admittedly due to a lack of knowledge on my part. Then I read some tidbits about mod_fcgid being better, so I tried it out and it just worked and has been just working ever since. Why is it so much better to have fastcgi as an external process? Is it because this is the only way to realistically to PAR-based deployments? What's wrong with having mod_fcgid do its process management. Because then you restart the FastCGI processes when you restart the web server. With external, you can have - webserver - fastcgi for app version N - fastcgi for app version N+1 all managed separately. that means you can update by - start N+1 - change apache config to point to N+1 - apachectl graceful - stop N which allows you to update with zero downtime - without even dropping a single request on the floor. And if something goes wrong, you can perform the process in reverse just as easily. I consider this essential for heavily-used applications since having a 5+ second window of mid-upgrade when the app doesn't respond is a pain in the ass for users. For less heavily used applications I don't care - apache starts the fastcgi handlers for shadowcat.co.uk because it's mostly a news + brochureware type site so a few seconds' downtime every so often really just doesn't matter to us. -- Mit freundlichen Grüßen Felix Antonius Wilhelm Ostmann -- Websuche Search Technology GmbH Co. KG Martinistraße 3 - D-49080 Osnabrück - Germany Tel.: +49 541 40666-0 - Fax:+49 541 40666-22 Email: [EMAIL PROTECTED] - Website: www.websuche.de -- AG Osnabrück - HRA 200252 - Ust-Ident: DE814737310 Komplementärin: Websuche Search Technology Verwaltungs GmbH - AG Osnabrück - HRB 200359 Geschäftsführer: Diplom Kaufmann Martin Steinkamp -- ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Catalyst, TT and using new filter
easy filters: package myApp::View::TT; use strict; use base 'Catalyst::View::TT'; __PACKAGE__-config( { CATALYST_VAR = 'catalyst', ... FILTERS = { yesno = sub { $_[0] ? 'yes' : 'no'; }, onoff = sub { $_[0] ? 'on' : 'off'; }, }, }, ); 1; Peter Sørensen schrieb: Hi, I am Using catalyst, TT and formbuilder. I am struggling with output in a textarea field and would like to install a new filter to TT to be used like: tdtextarea [% FOREACH line IN subscribers %] [% line | undent %] [% END %] /textarea/td I have tried the standard trim filter but this does not give the expected result. I found a post facing the problem, where Andy Wardley suggested a undent filter and supplied code for this. My problem is where to put this code so that TT will recognize this filter according to Catalyst. Do I need to install this as a new Plugin in TT? Regards Peter Sorensen/University of Southern Denmark/E-mail: [EMAIL PROTECTED] Med venlig hilsen Peter Sørensen Vid.medarb., IT-service Tlf.6550 2858 Fax 6550 2860 Email [EMAIL PROTECTED] Web http://intern.sdu.dk/it-service/ansatte/ps-238/ Adr.Campusvej 55, 5230 Odense M SYDDANSK UNIVERSITET ___ Campusvej 55 * 5230 * Odense M * Tlf. 6550 1000 * www.sdu.dk -Oprindelig meddelelse- Fra: Gavin Henry [mailto:[EMAIL PROTECTED] Sendt: 4. februar 2008 11:50 Til: catalyst@lists.scsys.co.uk Emne: [Catalyst] Catalyst and Web Services? Hi All, If you want to provide access over SSL with auth, i.e. for example a desktop app posting and retrieving info from/to a Catalyst app what's the best way? REST or SOAP? I want the same users that normalling login via a web browser and get a cookie to be able to login via a light wee desktop app or some such? Would you create a new interface/access point on the Cat site and use REST or SOAP? All new to me, so excuse the dumb questions. Thanks. ___ 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/ -- Mit freundlichen Grüßen Felix Antonius Wilhelm Ostmann -- Websuche Search Technology GmbH Co. KG Martinistraße 3 - D-49080 Osnabrück - Germany Tel.: +49 541 40666-0 - Fax:+49 541 40666-22 Email: [EMAIL PROTECTED] - Website: www.websuche.de -- AG Osnabrück - HRA 200252 - Ust-Ident: DE814737310 Komplementärin: Websuche Search Technology Verwaltungs GmbH - AG Osnabrück - HRB 200359 Geschäftsführer: Diplom Kaufmann Martin Steinkamp -- ___ 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] error handling
$c-error is a arrayref or not? So you must do this: if( @{$c-error} ) { ... } Angel Kolev schrieb: Hi,all. Can anyone eplain me a bit about error handling. Where i can catch it and when? I use this: MyApp::C::MyController sub auto : Private { my ($self, $c) = @_; if ($c-error) { $c-stash-{error} = Critical ERROR!! ; $c-forward('/error'); $c-error(0); return 0; } } This works but then all my subs in this controller are redirected to /error. ___ 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/ -- Mit freundlichen Grüßen Felix Antonius Wilhelm Ostmann -- Websuche Search Technology GmbH Co. KG Martinistraße 3 - D-49080 Osnabrück - Germany Tel.: +49 541 40666-0 - Fax:+49 541 40666-22 Email: [EMAIL PROTECTED] - Website: www.websuche.de -- AG Osnabrück - HRA 200252 - Ust-Ident: DE814737310 Komplementärin: Websuche Search Technology Verwaltungs GmbH - AG Osnabrück - HRB 200359 Geschäftsführer: Diplom Kaufmann Martin Steinkamp -- ___ 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] Search Solution
Other solution is Xapian Catalyst::Model::Xapian Pedro Melo schrieb: Hi, On Nov 8, 2007, at 8:23 AM, Fayland Lam wrote: Sorry for a bit off topic. I just wonder how to build a search engine for a heavy traffic site? use KinoSearch or Plunce? or just get result from MySQL? If you are using MySQL, checkout Sphinx also. They have some interesting numbers on their site. Also check the http://www.mysqlperformanceblog.com/ site for Sphinx-related posts. Best regards, -- Mit freundlichen Grüßen Felix Antonius Wilhelm Ostmann -- Websuche Search Technology GmbH Co. KG Martinistraße 3 - D-49080 Osnabrück - Germany Tel.: +49 541 40666-0 - Fax:+49 541 40666-22 Email: [EMAIL PROTECTED] - Website: www.websuche.de -- AG Osnabrück - HRA 200252 - Ust-Ident: DE814737310 Komplementärin: Websuche Search Technology Verwaltungs GmbH - AG Osnabrück - HRB 200359 Geschäftsführer: Diplom Kaufmann Martin Steinkamp -- ___ 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/