Re: [Catalyst] Beginner question: View directory

2007-11-07 Thread Dave Rolsky
On Thu, 8 Nov 2007, Kieren Diment wrote: Good call, my mistake. Goes to show that there's not usually much (or any) extra stuff that needs to be done in the View class. I was actually struggling to think of code related things (rather than config) which you might want to put in there.

Re: [Catalyst] Beginner question: View directory

2007-11-08 Thread Dave Rolsky
On Thu, 8 Nov 2007, Ash Berlin wrote: Similarly, I setup subs that I always want aviabale in the TT stash, such as format_datetime (which formats a DateTime object according do the currently logged in user's prefernce.) I also assing VMethods to $Template::Whatever::SCALAR_OPS here, since

Re: [Catalyst] Session, DateTime and Storable

2008-01-01 Thread Dave Rolsky
On Mon, 31 Dec 2007, Christopher Laco wrote: I've heard mention of this before, but I can't find the thread. I have the latest DateTime, Storable and Catalyst::Plugin::Session/Authentication and I've getting heap of these in my logs: Use of uninitialized value in subroutine entry at

[Catalyst] Launch of new (to Catalyst) site

2008-01-02 Thread Dave Rolsky
I finally was able to launch my first major project using Catalyst yesterday, the latest version of my VegGuide.Org site. This version uses Catalyst with Mason and Alzabo. One of the great things about this project was that I could use my existing model code as-is with basically no changes,

RE: [Catalyst] two Catalyst flaws

2008-01-03 Thread Dave Rolsky
On Thu, 3 Jan 2008, Peter Edwards wrote: In the latter case there's still some work to do if you want to have a shared config file but that's not too hard to figure out. There's a Catalyst advent calendar article showing how to do this: http://catalyst.perl.org/calendar/2007/14 I did

Re: [Catalyst] Re: Development environments and performance

2008-01-16 Thread Dave Rolsky
On Wed, 16 Jan 2008, kevin montuori wrote: DR == Dave Rolsky [EMAIL PROTECTED] writes: DR * dev is one box per dev, with the best hardware affordable - nowadays DR * that means at least a dual core machine with 4GB of ram and decent DR * disks. at least 4 GB of ram? crikey. I'm thinking

Re: [Catalyst] REST - like uri design for CRUD

2008-01-20 Thread Dave Rolsky
On Sun, 20 Jan 2008, Thomas L. Shinnick wrote: They specifically allow that when PUT is not available or impracticable (clients, firewalls, and proxies can get in the way), you could 'overload' POST by, for example, adding a query parameter _method=PUT to pass-thru the real request method.

Re: [Catalyst] REST - like uri design for CRUD

2008-01-20 Thread Dave Rolsky
On Sun, 20 Jan 2008, Ashley wrote: Clipped a bunch. This is great food for thought. I am missing in this scheme how you would know to serve the form for updating. That seems to be the real point of /class/id//update. I suppose that should be /class/id//edit instead and it would, if it

Re: [Catalyst] Malformed class Name Hidden files

2008-01-30 Thread Dave Rolsky
On Wed, 30 Jan 2008, Jonathan Rockway wrote: I have traced this down to the fact that my text editor (TextMate) likes to leave hidden files around with similar names as those being edited. For example the above error says something about ._MyAppDB where this a file named MyApp/lib/MyAppDB.pm

Re: [Catalyst] Malformed class Name Hidden files

2008-01-30 Thread Dave Rolsky
On Wed, 30 Jan 2008, Jonathan Rockway wrote: * On Wed, Jan 30 2008, Dave Rolsky wrote: Yes, unfortunately it's never been freaking fixed, which is why it's come up 129387 times (at least). I did submit a patch to Simon Wistow for Module::Pluggable in September. It made Module::Pluggable ignore

Re: [Catalyst] Sending email safely with Catalyst

2008-04-11 Thread Dave Rolsky
On Fri, 11 Apr 2008, Jonathan Rockway wrote: In an ideal world, you should be able to dump the messages into your mail system's queue as quickly as you can dump them into a database table (adding to the mail queue is a disk write, adding to a database is a disk write, unless you've turned off

Re: [Catalyst] Unit Testing

2008-04-19 Thread Dave Rolsky
On Sat, 19 Apr 2008, John Romkey wrote: I suspect that most Catalyst users build their applications so that the controllers do too much work. I certainly did, and I'm gradually rewriting mine to move most of the work into the model. Where before my controllers A good way to approach a webapp

Re: [Catalyst] Multi-language and REST

2008-04-25 Thread Dave Rolsky
On Fri, 25 Apr 2008, Ian Docherty wrote: http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#z12 Yes, I have done this previously, it is elegant, but not RESTful and does not make it easy for users to change their settings on a site-by-site basis dynamically, as you could if you provided a

Re: [Catalyst] Re: Multi-language and REST

2008-04-25 Thread Dave Rolsky
On Fri, 25 Apr 2008, Aristotle Pagaltzis wrote: * Ashley [EMAIL PROTECTED] [2008-04-25 22:20]: I like PUT and DELETE too but I'm not going to abandon POST as their stand-in (or fall-back) any time soon. http://search.cpan.org/dist/Catalyst-Request-REST-ForBrowsers/ autarch++ Thanks. This

Re: [Catalyst] Re: So, what do we want in the -next- book?

2008-04-27 Thread Dave Rolsky
On Mon, 28 Apr 2008, Aristotle Pagaltzis wrote: I’m not talking about COMPONENT. I’m talking about classes with accessors for which they never set a value themselves. I don’t remember specific examples since it was two or three weeks ago, but it had to do with the dispatcher, and I stumbled

Re: [Catalyst] Re: RFC: Catalyst::Controller::REST::DBIC

2008-05-16 Thread Dave Rolsky
On Fri, 16 May 2008, Zbigniew Lukasiak wrote: - a search I tend to prefer expressing searches with query parameters… hm. I understand that what you propose is '/cd?year=1968', is that right? I really don't know - but some people would prefer to do the search by POST, or might just like to

Re: [Catalyst] Re: RFC: Catalyst::Controller::REST::DBIC

2008-05-16 Thread Dave Rolsky
On Fri, 16 May 2008, Zbigniew Lukasiak wrote: Why would anyone care about GET vs POST? I guarantee most users don't care. If you mean they want to use a form, that has nothing to do with the method. Forms can submit GET requests. It might need to be a POST if you need to download a file as

Re: [Catalyst] Catalyst site design drafts feedback thread

2008-06-11 Thread Dave Rolsky
On Wed, 11 Jun 2008, Matt S Trout wrote: Simon Elliott: (1) http://www.browsing.co.uk/cat Overall my favorite. The white text against the bottom of the grey gradient starts to fade, but I'm sure that's easily fixed. I wouldn't mind making all the non-tab text a little larger, but maybe my

Re: [Catalyst] [Fwd: [rt-users] Security vulnerability in RT 3.0 and up]

2008-06-24 Thread Dave Rolsky
On Mon, 23 Jun 2008, Lance A. Brown wrote: H. Is this something Catalyst needs to worry about? The case to tickle this particular bug is that you need to pass bad UTF8 to a sub that's in the call chain and then generate a Devel::StackTrace object and then try to stringify that object.

Re: [Catalyst] [Fwd: [rt-users] Security vulnerability in RT 3.0 and up]

2008-07-20 Thread Dave Rolsky
On Sun, 20 Jul 2008, Matt S Trout wrote: On Mon, Jun 23, 2008 at 01:17:15PM -0400, Lance A. Brown wrote: H. Is this something Catalyst needs to worry about? StackTrace only activates for Catlyst in debug mode. But if you're writing Mason views, Mason uses Devel::StackTrace

Re: [Catalyst] Making proxy requests cooperate with uri_for

2008-11-13 Thread Dave Rolsky
as if it were from a dir. This is easily accomplished with ProxyPass /from_dir http://localhost:8080/ ProxyPassReverse /from_dir http://localhost:8080/ The problem then is $c-uri_for(/) returns http://localhost/ when http://localhost/from_dir is what is really needed. Dave Rolsky

Re: [Catalyst] Re: OT: Use the CPAN, Luke?

2008-11-27 Thread Dave Rolsky
On Fri, 28 Nov 2008, Johan Lindstr?m wrote: At 06:58 2008-11-27, Aristotle Pagaltzis wrote: According to the Mouse docs, Mouse supports the most commonly used features of Moose, but runs in 25% of the time. I'm happy I think that may be referring to startup time (and the Mouse POD refers

Re: [Catalyst] RFC: The paradox of choice in web development

2009-02-17 Thread Dave Rolsky
On Tue, 17 Feb 2009, bill hauck wrote: I'm trying to put together a project to rewrite a job tracking database currently running in FileMaker. The functionality and scope of the job tracking system has changed so instead of throwing more money in a proprietary, closed system that requires a

Re: [Catalyst] script/myapp_server -r Can't exec /usr/bin/perl every 3 or 4 restarts

2009-04-30 Thread Dave Rolsky
On Thu, 30 Apr 2009, Matt S Trout wrote: On Thu, Apr 30, 2009 at 02:44:05PM +0200, Erik Wasser wrote: On Tuesday 28 April 2009, Matt S Trout wrote: Two possibilities: (1) exec a $^X to print @INC to get the normal @INC (2) use $Config{arch} and /^5.\/ to strip off the extra ones.

[Catalyst] New restarter code in Catalyst::Devel 1.14_01

2009-05-10 Thread Dave Rolsky
I recently did some work to rewrite the Catalyst restarter code and make it both simpler and less fragile. The restarter no longer attempts to reload changed modules in an existing process. This was fragile, and tended to produce a lot of bogus compilation failures. The new restarter just

Re: [Catalyst] New restarter code in Catalyst::Devel 1.14_01

2009-05-19 Thread Dave Rolsky
On Tue, 19 May 2009, Rodrigo wrote: Since I needed to have the restarter working badly on that machine in particular, I quickly patched the code with Proc::Background. Something like this: sub _fork_and_start() { my $proc = new Proc::Background(perl $0); # I'm writing this from memory; not

Re: [Catalyst] New restarter code in Catalyst::Devel 1.14_01

2009-05-23 Thread Dave Rolsky
On Tue, 19 May 2009, Rodrigo wrote: Since I needed to have the restarter working badly on that machine in particular, I quickly patched the code with Proc::Background. Something like this: I implemented something like this in the latest Catalyst::Devel. I did more thorough testing on Windows

Re: [Catalyst] New restarter code in Catalyst::Devel 1.14_01

2009-05-24 Thread Dave Rolsky
On Mon, 25 May 2009, Rodrigo wrote: Shame we can't use the new pre-loading functionality on Windows though. I tested with different versions of things and errors just got nastier and nastier. IMO, to be able to pick restarter engines via %ENV was also a necessary change anyway. Say, in the

Re: [Catalyst] Mason + DBI + Catalyst?

2009-05-25 Thread Dave Rolsky
On Mon, 25 May 2009, J. Shirley wrote: Rather than Catalyst being geared towards TT, I would say Mason is geared towards being a framework :) Well, sort of. Mason is quite usable as a pure templating system. I use Mason with Catalyst for all my new projects, and the framework parts of Mason

Re: [Catalyst] How to use local::lib

2009-06-23 Thread Dave Rolsky
On Tue, 23 Jun 2009, Tobias Kremer wrote: Cool, but what I really meant to ask was: Is it possible to require a specific version in your Makefile.PL and have only this version installed during make installdeps? :) This would possibly solve most of the CPAN-related deployment problems. FWIW,

Re: [Catalyst] Polymorphism?

2009-07-06 Thread Dave Rolsky
On Mon, 6 Jul 2009, J. Shirley wrote: Moose method modifiers work just fine on Catalyst code, which I find to really help with using inheritance upstream. You'll probably want to As do Moose roles. I've found using roles in controllers incredibly helpful, since I often have similar/same

Re: [Catalyst] Catalyst benchmark 5.7 VS 5.8

2009-09-29 Thread Dave Rolsky
On Tue, 29 Sep 2009, Carl Johnstone wrote: What everybody else in this thread is referring to as shared memory is actually the amount of memory that hasn't needed to be duplicated because of the copy-on-write semantics within the Linux kernel. Unfortunately there's currently no easy way I know

RE: [Catalyst] Re: Deployment in practice

2009-10-09 Thread Dave Rolsky
On Fri, 9 Oct 2009, Mesdaq, Ali wrote: At least with the first issue you can roll back the change and get back to stable instantly. With the other issue you could be troubleshooting for a long time. But I think the OP (other poster) mentioned packages. Presumably you can roll back to an

Re: [Catalyst] How to reduce the memory footprint?

2009-11-23 Thread Dave Rolsky
On Mon, 23 Nov 2009, Julien Sobrier wrote: I run 5 instances of FastCGI. Each instance was taking about 90MB of memory. I tried to reduce the memory fooprint by reducing the number of libraries I used. The memory usage is now 120MB per instance! The memory increase is probably due to other

Re: [Catalyst] Best practice for setting up database in a complex project?

2010-07-16 Thread Dave Rolsky
On Fri, 16 Jul 2010, Matija Grabnar wrote: Do you write the database definition mysql/postgresql format, and then dump schema to get the Perl classes, or do you write Perl class definitions and use something else to output the table creation statements for the database of your choice?

Re: [Catalyst] Re: Moose/Object error in Catalyst

2010-10-13 Thread Dave Rolsky
On Wed, 13 Oct 2010, Sir Robert Burbridge wrote: I notice that the relevant bit of Moose::Object (line 39 from the error you got) says:  28 sub BUILDARGS {  29 my $class = shift;  30 if ( scalar @_ == 1 ) {  31 unless ( defined $_[0] ref $_[0] eq 'HASH'

Re: [Catalyst] Sanity Check -- requesting feedback on chaining approach

2011-02-16 Thread Dave Rolsky
On Tue, 15 Feb 2011, will trillich wrote: Does this seem like a best practice? Comments welcome. Personally, my take on best practices for chaining is basically make sane RESTful URIs. I like to name my non-public chain point with private subs, and I like my end points to be descriptive.

Re: [Catalyst] Sanity Check -- requesting feedback on chaining approach

2011-02-17 Thread Dave Rolsky
On Wed, 16 Feb 2011, will trillich wrote: Hmm. Curious about the inline comment there -- how do you do CSV based on accept-header? You look for an Accept header that specifies text/csv (or whatever the content type is) vs text/html. Or, if you're using a regular browser, you use a hack

Re: [Catalyst] Sanity Check -- requesting feedback on chaining approach

2011-02-17 Thread Dave Rolsky
On Thu, 17 Feb 2011, will trillich wrote: Okay, so there's a link in a web page that the browser sees that tells it when following *this* link, ask for a CSV file, as opposed to that normal HTML hooey you usually ask for. How do we do that, if not thru a URL?

Re: [Catalyst] [ANNOUNCE] Catalyst-Runtime-5.89002-TRIAL PSGI Catalyst - third development release

2011-03-03 Thread Dave Rolsky
On Thu, 3 Mar 2011, Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 wrote: Apart from less code for each framework, there is the other advantage that adding support for a new Web server (e.g. Plack::Handler::Mongrel2) automatically enables this Web server for any PSGI-compliant framework. While it has been possible to run

Re: [Catalyst] Requesting example code for postfix and Email::Sender

2011-03-21 Thread Dave Rolsky
On Mon, 21 Mar 2011, Kutbuddin Doctor wrote: I am looking for an example of how to configure catalyst to use postfix on localhost to send email (mostly application notifications) via catalyst. And especially example code from someone who has done this successfully. I have seen several

Re: [Catalyst] Re: General API question: REST + SOAP

2011-04-06 Thread Dave Rolsky
On Thu, 7 Apr 2011, Aristotle Pagaltzis wrote: This is a very bad idea. No matter what problem you have, a custom HTTP header is very nearly certainly the wrong solution. For API versioning it definitely is. My understanding of REST, at least, is that versioning should be done by specifying

Re: [Catalyst] Moose Upgrade

2011-04-17 Thread Dave Rolsky
On Sun, 17 Apr 2011, John M. Dlugosz wrote: I just updated Moose to 2, on my development system, prepatory to doing some Moose explorations. Catalyst didn't like it one bit. I'm still installing other updates based on things mentioned in errors, when I try and run script/myapp_server. Any

Re: [Catalyst] Moose Upgrade

2011-04-18 Thread Dave Rolsky
On Mon, 18 Apr 2011, John M. Dlugosz wrote: On 4/17/2011 9:55 PM, Dave Rolsky autarch-at-urth.org |Catalyst/Allow to home| wrote: Running moose-outdated | cpanm should upgrade everything that needs upgrading. I don't have cpanm, but moose-outdated is good to know about! Thanks. cpan

Re: [Catalyst] Catalyst generating emails -- how to buffer large attachments?

2011-12-26 Thread Dave Rolsky
On Fri, 23 Dec 2011, will trillich wrote: We switched to Mail::Sender -- it opens a connection to the SMTP server immediately, and pipes the output generating on -the-fly, instead of accumulating beaucoup megabytes in RAM to then ship off the whole thing at once. This is really not a great

Re: [Catalyst] RESTful response codes.

2012-02-23 Thread Dave Rolsky
On Fri, 24 Feb 2012, Bill Moseley wrote: This consumer of he API is arguing that the 2xx HTTP response are not enough of a status -- that every request needs a status (and that should not mix HTTP transport codes with business logic).  But, I cannot think of an example where this would be the

Re: [Catalyst] upstart script for Starman-based app?

2012-05-03 Thread Dave Rolsky
On Thu, 3 May 2012, Octavian Rasnita wrote: Does anyone have an upstart script that can be used for automaticly starting a Cat app using Starman? I use Perlbrew and local::lib and I start the app in my own account and not as root and I don't know how to make upstart start the app under my

Re: [Catalyst] upstart script for Starman-based app?

2012-05-06 Thread Dave Rolsky
On Fri, 4 May 2012, Octavian Rasnita wrote: expect fork I'm not sure why you need this. There's no fork happening with your config, AFAICT. But isn't Starman doing a fork? Yes, but the expect fork is telling upstart to expect the process to fork once and create a single child, letting

Re: [Catalyst] upstart script for Starman-based app?

2012-05-07 Thread Dave Rolsky
On Mon, 7 May 2012, Octavian Rasnita wrote: With Starman, the parent stays active, and it's what should be killed when you want to stop the process. I see that this is not happening, at least if starman receives the --user and --group parameters. I have use --user teddy --group teddy in the