[Catalyst] Catalyst::Model::DBIC::Schema and dbh_maker

2010-05-25 Thread Bill Moseley
' COMPONENT' = sub {} and simply modify the passed in arguments. I do not have any config in the model class that I need to worry about merging with the passed in arguments. Is this a reasonable way to do this? -- Bill Moseley mose...@hank.org ___ List

Re: [Catalyst] Not cleaning up temporary files / HTTP::Body

2010-05-22 Thread Bill Moseley
On Fri, May 21, 2010 at 10:24 AM, Tomas Doran bobtf...@bobtfish.net wrote: On 13 Jan 2010, at 14:53, Bill Moseley wrote: Where should this be addressed? In Catalyst or in HTTP::Body? I'm all for it being addressed as suggested, in both places (for extra double sure). It's been five

Re: [Catalyst] Catalyst::Model::DBIC::Schema and ACCEPT_CONTEXT -- current user in model

2010-05-14 Thread Bill Moseley
to pass the current user to some methods: pass_user_to_meethod = [ 'can_user_access' ] Or I use something like ACCEPT_CONTEXT to set the current user in the schema. Better ideas? This is going to be a killer Music app. I just hope CDs don't go out of style. -- Bill Moseley mose

[Catalyst] Catalyst::Model::DBIC::Schema and ACCEPT_CONTEXT -- current user in model

2010-05-13 Thread Bill Moseley
to row objects. Seems this has come up many times but not having much Google luck. Anyone have a link or an example? Thanks, -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman

Re: [Catalyst] Adding build scripts to Makefile.PL

2010-05-11 Thread Bill Moseley
On Mon, May 10, 2010 at 9:31 PM, Florian Ragwitz r...@debian.org wrote: On Mon, May 10, 2010 at 06:15:03PM -0700, Bill Moseley wrote: I have a number of scrips that need to be run when building an application. For example, I have a script that minifies javascript and css

[Catalyst] Adding build scripts to Makefile.PL

2010-05-10 Thread Bill Moseley
of the targets (i.e. a script just finds all .css files and minifies them) so might just want to run a command every time make is run. Anyone have examples of how to set this up in Makefile.PL (which uses Module::Install)? Thanks, -- Bill Moseley mose...@hank.org

Re: [Catalyst] Catalyst::Plugin::Session: Duplicate entry errors

2010-05-08 Thread Bill Moseley
/update problems. Does it make it atomic or just fail if a second session tries to create with the same primary key? Looking at some old code I see that I first attempt a create, and if that fails with a duplicate error I then do a find. Don't need a transaction for that. -- Bill Moseley mose

Re: [Catalyst] Returning error codes to the user.

2010-05-02 Thread Bill Moseley
on this list. I try not to find it discouraging that old topics like benchmarking methods calls and the few inflammatory remarks seem to get so much traction. :) -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http

Re: [Catalyst] Returning error codes to the user.

2010-05-02 Thread Bill Moseley
be active', { 'account.active' = 1 }, { join = 'account' }, ); etc. Then, as you say, if $self-current_resultset-first (top of stack) fails then work down the stack until find the spot where the query passes and return the previous message. Thanks, -- Bill Moseley mose...@hank.org

Re: [Catalyst] RunAfterRequest/delayed Catalyst view

2010-04-30 Thread Bill Moseley
the request to the local sendmail or I write it to a store and another (non-web) process on a separate machine (or machines) manage delivering the mail. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk

[Catalyst] Returning error codes to the user.

2010-04-30 Thread Bill Moseley
would you recommend? Have a separate /user/$id/debug method that does a separate step-by-step of the business logic? Scrap all that really handy chaining of resultsets that works so well with Catalyst's chained actions? -- Bill Moseley mose...@hank.org

Re: [Catalyst] RunAfterRequest/delayed Catalyst view

2010-04-30 Thread Bill Moseley
then why not use them? Might need to think about other things like how a long running process might effect the need to restart the sever, etc. Job queues are nice. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http

[Catalyst] Automated testing?

2010-04-18 Thread Bill Moseley
? Anyone using Smolder and/or SmokeRunner::Multi or other standard tools for their in-house code? Thanks, -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable

[Catalyst] Catalyst::Utils::home()

2010-04-12 Thread Bill Moseley
home() could not walk @INC looking for the app .pm file if not found in %INC? Or is there another approach to find home? Oh, btw -- # we found nothing return 0; maybe just return; -- or simply die Cannot determine home for App $class; -- Bill Moseley mose...@hank.org

Re: [Catalyst] Distributing and updating Cat apps

2010-04-09 Thread Bill Moseley
modules (packages). Mostly that was to encourage inclusions of unit tests and just more fine-grained management. But, it is more work, true. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin

Re: [Catalyst] Distributing and updating Cat apps

2010-04-05 Thread Bill Moseley
On Mon, Apr 5, 2010 at 2:31 AM, Oleg Kostyuk cub.ua...@gmail.com wrote: 2010/3/30 Bill Moseley mose...@hank.org: .. The applications have separate YAML files for different environments. There might be dev.yml, testing.yml, qa.yml, and produciton.yml. Each

[Catalyst] [OT] XSS, XSRF, and REST

2010-04-01 Thread Bill Moseley
access (in complying browsers). And I feel like providing the session ID in the markup opens up the possibility of XSS that would send the session id to an attacker. Of course, a successful XSS attack and your wide open anyway. -- Bill Moseley mose...@hank.org

Re: [Catalyst] Distributing and updating Cat apps

2010-03-30 Thread Bill Moseley
lib directory since you know when it's pushed you will have exactly the same code used in development. Lot easier to revert when everything is under a a single symlink. I've heard of people that build an entire Perl installation and keep that separate from the OS installed Perl. -- Bill Moseley

Re: [Catalyst] Picking template type based on input

2010-03-29 Thread Bill Moseley
the tokens are a mixed bag. Yes, the tokens would help, but if you have them on your URLs then you have to worry about bookmarking and link leaking. The tokens I use help with POSTing forms, but for critical changes I still add an Are you sure? page. -- Bill Moseley mose...@hank.org

[Catalyst] HttpOnly flag dependency.

2010-03-29 Thread Bill Moseley
::State::Cookie. Could that be added to Runtime? Thanks, -- Bill Moseley 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

Re: [Catalyst] Picking template type based on input

2010-03-28 Thread Bill Moseley
policy. That is, javascript running on evil_empire.com's page cannot do an AJAX request to your catalyst application. Hopefully, that's clear -- and correct. ;) -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http

Re: [Catalyst] Picking template type based on input

2010-03-28 Thread Bill Moseley
the bank. That is, you would see the bank's response page. Can't do it via an AJAX request because of the same-origin policy. Slippery stuff. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi

Re: [Catalyst] Picking template type based on input

2010-03-28 Thread Bill Moseley
On Sun, Mar 28, 2010 at 6:05 PM, Tomas Doran bobtf...@bobtfish.net wrote: On 29 Mar 2010, at 01:06, Bill Moseley wrote: I do this -- every POST must include token, and the token can only be used once. That means the the form must be fetched before bing posted (to generate the token

Re: [Catalyst] Catalyst Redirect to https

2010-03-26 Thread Bill Moseley
On Fri, Mar 26, 2010 at 12:46 AM, Octavian Rasnita orasn...@gmail.comwrote: *From:* Bill Moseley mose...@hank.org SetEnv HTTPS On Does that header get to Catalyst? Obviously, check that first. I didn't know that HTTPS should be an HTTP header and not an environment variable so I

Re: [Catalyst] Picking template type based on input

2010-03-26 Thread Bill Moseley
. That is, the controllers have to know what view is going to be used so that it can fetch the data needed for that specific view. Is that what you are saying? -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk

Re: [Catalyst] Taking advantage of idle periods by performing some action(s)

2010-03-25 Thread Bill Moseley
. Yes, you do want an outside worker. It can be part of your app, but it should be separate from Catalyst. Put it in a model class. Ok, sure you could have cron run App/script/app_test.pl /path/to/action but why load all of Catalyst just to run some code in your application? -- Bill

Re: [Catalyst] Taking advantage of idle periods by performing some action(s)

2010-03-25 Thread Bill Moseley
it seems an error in one job resulted in other jobs not running. So, if you really want to send requests to your running Catalyst application then I'd use cron and lwp/wget instead of the plugin. -- Bill Moseley mose...@hank.org ___ List: Catalyst

Re: [Catalyst] Catalyst Redirect to https

2010-03-25 Thread Bill Moseley
to send to two different ports and then detect SSL based on the port number. Same result either way. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable

Re: [Catalyst] Best practices: XML output from static XML

2010-03-07 Thread Bill Moseley
feels more like a view operation. Minor point but turning, say, a DateTime object into a human-readable format (or ISO8601 for JSON response) both seem like views. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http

Re: [Catalyst] Which C::View::PDF should I use?

2010-03-06 Thread Bill Moseley
about. -- Bill Moseley 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

Re: [Catalyst] Best practices: XML output from static XML

2010-03-06 Thread Bill Moseley
view code? -- Bill Moseley 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

Re: [Catalyst] Best practices: XML output from static XML

2010-03-06 Thread Bill Moseley
app on top -- especially if it's all client side. But, again I still think the action's job would be to just place model objects in the stash -- not build a json structure as that is only needed when the response is actually json. -- Bill Moseley mose...@hank.org

Re: [Catalyst] Check session expiry without extending it

2010-03-04 Thread Bill Moseley
to rethink then entire process and just make request that can be independent and either work or fail in some graceful way. making assumptions about expected state is problem the root cause. -- Bill Moseley mose...@hank.org ___ List: Catalyst

[Catalyst] JSON views and CamelCase column names

2010-02-25 Thread Bill Moseley
enough without having to do it for every action explicitly. Something similar to DBIC's HashRefInflator. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst

Re: [Catalyst] Large requests with JSON?

2010-02-06 Thread Bill Moseley
On Fri, Feb 5, 2010 at 8:56 PM, Tomas Doran bobtf...@bobtfish.net wrote: On 5 Feb 2010, at 20:54, Bill Moseley wrote: AFAIK, there's no way to stream parse JSON (so that only part is in memory at any given time). What would be the recommended serialization for uploaded files -- just use

Re: [Catalyst] Re: action_for with user_id removed ...

2010-02-06 Thread Bill Moseley
profile go to: http://example.com/user/your id here/profile Because you know what the tech support calls will be like -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo

Re: [Catalyst] Re: Large requests with JSON?

2010-02-06 Thread Bill Moseley
On Sat, Feb 6, 2010 at 11:29 AM, Aristotle Pagaltzis pagalt...@gmx.dewrote: * Bill Moseley mose...@hank.org [2010-02-06 17:30]: As in don't provide a way to upload meta data along with the file (name, date, description, author, title, reference id) like the web upload allows with multipart

Re: [Catalyst] Run catalyst tests against another database

2010-02-06 Thread Bill Moseley
want test information in my code. How do people do this? I use separate config files that get merged into the main config. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo

[Catalyst] Large requests with JSON?

2010-02-05 Thread Bill Moseley
that seem like a pretty easy DoS for Catalyst apps? I do set a request size limit in the web server, but if I need to allow 1/2GB uploads or so then could kill the machine pretty easily, no? -- Bill Moseley mose...@hank.org ___ List: Catalyst

Re: [Catalyst] Using Catalyst with mod_per or FastCGI on heavy traffic web application

2010-01-30 Thread Bill Moseley
balancer? Or it's not run with a reverse proxy as is the standard approach? We found that restarting with FastCGI took longer. Maybe that was because each process has to compile the app (instead of compile and fork to many processes?). Is that true? I can't remember. -- Bill Moseley mose

Re: [Catalyst] Using Catalyst with mod_per or FastCGI on heavy traffic web application

2010-01-29 Thread Bill Moseley
to all the possibilities (and default httpd.conf Apache provides) but really the config required to get it to serve a Catalyst app is just a few lines. My entire files are pretty small: $ fgrep -v '#' httpd.conf | grep -v '^$' |grep -v LoadModule | grep -v 'Module' | wc -l 40 -- Bill Moseley

Re: [Catalyst] How to de-serialize json?

2010-01-27 Thread Bill Moseley
was not used in the existing REST/RPC modules, as that was already the place used by Catalyst to de-serialize the body. I thought maybe there was a reason I might not understood, which is why I asked. [1] Or whatever the correct approach is, and apologies to Damian for the map. -- Bill Moseley mose

Re: [Catalyst] How to de-serialize json?

2010-01-27 Thread Bill Moseley
On Wed, Jan 27, 2010 at 1:16 PM, Tomas Doran bobtf...@bobtfish.net wrote: On 27 Jan 2010, at 15:33, Bill Moseley wrote: No big deal. I was just curious why the HTTP::Body approach was not used in the existing REST/RPC modules, as that was already the place used by Catalyst to de-serialize

Re: [Catalyst] UTF-8 and mails

2010-01-25 Thread Bill Moseley
. And IMO string literals are better left in templates, in the databaes, and .po files. I use English, so I don't worry about utf-8 variable names. I always assumed at some point utf8 would become the default for Perl source, though. -- Bill Moseley mose...@hank.org

Re: [Catalyst] How to de-serialize json?

2010-01-24 Thread Bill Moseley
not understood. That's really all. -- Bill Moseley 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

Re: [Catalyst] Where is the form field lost?

2010-01-24 Thread Bill Moseley
on destroy). Otherwise you can end up with orphaned temp files. -- Bill Moseley 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

Re: [Catalyst] Where is the form field lost?

2010-01-24 Thread Bill Moseley
}; Maybe for fear of line ending conversion?? -- Bill Moseley 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

[Catalyst] How to de-serialize json?

2010-01-23 Thread Bill Moseley
approaches to decoding request body content? -- Bill Moseley 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

Re: [Catalyst] How to de-serialize json?

2010-01-23 Thread Bill Moseley
. -- Bill Moseley 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/

Re: [Catalyst] How to de-serialize json?

2010-01-23 Thread Bill Moseley
the upload object in $req-uploads. -- Bill Moseley 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

[Catalyst] Catalyst::Controller::REST vs. Catalyst::Controller::DBIC::API

2010-01-21 Thread Bill Moseley
to actions not unlike Catalyst::Plugin::Server::XMLRPC. It's been very helpful to have the API use the exact same controller actions as the web interface. Some of the existing controllers contain complex logic, so obviously want to use that same code for the API as well. -- Bill Moseley mose

Re: [Catalyst] Error handling

2010-01-20 Thread Bill Moseley
this a bit more. -- Bill Moseley 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

Re: [Catalyst] Re: modules for conditional GET ?

2010-01-18 Thread Bill Moseley
that a change is seen exactly the same time by all users. Dynamic content is not cached, of course, but elements of the page may be cached in memcached. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http

[Catalyst] Not cleaning up temporary files / HTTP::Body

2010-01-13 Thread Bill Moseley
removes the File::Temp object from the upload part, but I'm not sure why it needs to do that. Why not leave the File::Temp object in the upload part object then let it go out of scope at the end of the request. Where should this be addressed? In Catalyst or in HTTP::Body? -- Bill Moseley mose

Re: [Catalyst] proper flow control with $c-foward, in search of greater grok

2010-01-08 Thread Bill Moseley
the right approach, but not sure I see why the Eww in this specific case. Can you explain? -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http

Re: [Catalyst] Sub-classing Application

2010-01-04 Thread Bill Moseley
, etc.). That's a bit more flexible for deployment (e.g. some features on a subset of servers) but sharing of common templates, css, js, etc. is more of a challenge. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http

[Catalyst] Sub-classing Application

2009-12-16 Thread Bill Moseley
ideas how to implement something like that? -- Bill Moseley 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

Re: [Catalyst] Sub-classing Application

2009-12-16 Thread Bill Moseley
is still the same between the two applications. So, it would be handy to say, this application inheits from Foo, but these with a few methods added or overridden. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http

Re: [Catalyst] Sub-classing Application

2009-12-16 Thread Bill Moseley
be shared (or overridden). Thanks, -- Bill Moseley 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

Re: [Catalyst] Request: Wrong Content-Length value: 2628941

2009-11-30 Thread Bill Moseley
some encoding error. Not sure what additional error message would be helpful, though. Thanks again, -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable

Re: [Catalyst] Avoiding UTF8 in Catalyst

2009-11-23 Thread Bill Moseley
On Mon, Nov 23, 2009 at 2:01 AM, Marc SCHAEFER schae...@alphanet.ch wrote: On Sat, Nov 21, 2009 at 05:16:24PM -0800, Bill Moseley wrote: Apparently all diacritic characters are expanded into HTML entities. Where does that happen? It looks like it's TT::View's htmlentity which does

Re: [Catalyst] Re: Avoiding UTF8 in Catalyst

2009-11-23 Thread Bill Moseley
point decoding and encoding should be core not just a plugin. It's an important part of the request cycle. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst

Re: [Catalyst] Avoiding UTF8 in Catalyst

2009-11-21 Thread Bill Moseley
', DEFAULT_ENCODING = 'ISO-8859-1', WRAPPER = 'wrapper.tt'); There's a DEFAULT_ENCODING option? Isn't it just ENCODING? Apparently all diacritic characters are expanded into HTML entities. Where does that happen? -- Bill Moseley mose...@hank.org

Re: [Catalyst] Re: Language selection in URLs

2009-11-18 Thread Bill Moseley
. -- Bill Moseley 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/

[Catalyst] Request: Wrong Content-Length value: 2628941

2009-11-15 Thread Bill Moseley
); } I suppose if $buffer just happened to be zero. Probably should be checking defined there. Could this message be updated to report the length of the body read, too? And maybe display the last X bytes of data read might be useful in some cases. -- Bill Moseley mose...@hank.org

[Catalyst] Suppressing exceptions in Engine / UploadProgress

2009-11-08 Thread Bill Moseley
) || {}; $progress-{aborted} = 1; $c-cache-set( 'upload_progress_' . $id, $progress ); } # rethrow the error Catalyst::Exception-throw( $croaked ); } -- Bill Moseley mose...@hank.org ___ List

Re: [Catalyst] Question about C:P:Unicode(::Encoding)

2009-10-24 Thread Bill Moseley
have cryptic notes elsewhere where I had problems with Data::Visitor. Hum, should have taken better notes. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst

Re: [Catalyst] Re: Validating single arg id

2009-10-21 Thread Bill Moseley
to specify the topic, or it might be ?topic=123, or it might be part of the post parameters. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http

Re: [Catalyst] Validating single arg id

2009-10-17 Thread Bill Moseley
on. -- Bill Moseley 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

Re: [Catalyst] Re: Validating single arg id

2009-10-17 Thread Bill Moseley
search_rs() ) would be the method to override? Perhaps a better approach would be add a safe_find() as J. Shirley suggested, but what good are methods if you don't override them. ;) -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk

Re: [Catalyst] Re: Adding default query parameters to generated links.

2009-10-17 Thread Bill Moseley
back a new session id every request or ever few minutes. -- Bill Moseley 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

[Catalyst] Validating single arg id

2009-10-16 Thread Bill Moseley
that $id in situations like this where there's a single id? Do you just let the database throw the exception? I prefer to return 404s for invalid ids, regardless of their format (and likewise for ids that point to valid object, but are not owned by the current user instead of a 403). -- Bill Moseley

Re: [Catalyst] Choosing the language

2009-10-12 Thread Bill Moseley
posted is very close to what I do. -- Bill Moseley 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

Re: [Catalyst] Deployment in practice

2009-10-10 Thread Bill Moseley
. Depending on the update some servers may get pulled out of the balancer before upgrading to do it in stages. Pushing a previous version will just update the symlinks if they revesion exists. Not perfect but seems to work ok for now. -- Bill Moseley mose...@hank.org

Re: [Catalyst] Re: Calling Controller Methods from inside begin or auto.

2009-09-30 Thread Bill Moseley
. Not sure I remember the details of that choice, but one reason might have been I didn't want a URL for one resource to return a 200 yet not return the response for that URL and instead return a login form. -- Bill Moseley mose...@hank.org ___ List: Catalyst

Re: [Catalyst] Re: Calling Controller Methods from inside begin or auto.

2009-09-30 Thread Bill Moseley
request and go immediately to end() } return 1; # success; carry on to next action } RFC3986 has: absolute-URI = scheme : hier-part [ ? query ] And 2616: Location = Location : absoluteURI -- Bill Moseley mose...@hank.org

Re: [Catalyst] Re: Calling Controller Methods from inside begin or auto.

2009-09-30 Thread Bill Moseley
. -- Bill Moseley 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

Re: [Catalyst] selectively using the wrapper

2009-09-16 Thread Bill Moseley
On Wed, Sep 16, 2009 at 9:11 AM, Ascii King t...@swattermatter.com wrote: Bill Moseley wrote: In my mind the wrapper is a view issue, so I set the wrapper in the template not in the controller. I have a wrapper that is called for *every* page that is used to build the page. META

[Catalyst] Class data in a Moose::Role plugin

2009-09-02 Thread Bill Moseley
line 5. Compilation failed in require at /usr/local/lib/perl/5.10.0/Class/MOP.pm line 134. ... -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive

[Catalyst] Where to add access control? Override execute() or dispatch()?

2009-09-02 Thread Bill Moseley
) still run? Or should it act as if the /foo/bar action doesn't exist and not run any begin, auto, or end in the Foo controller? -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman

Re: [Catalyst] Splitting up a large application: Shared config and templates for multiple applications

2009-08-28 Thread Bill Moseley
for application, similar to what many CMSs have. -- Bill Moseley 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

[Catalyst] ActionClass vs. Moose Role?

2009-08-28 Thread Bill Moseley
be applied. Any guidance here? Is everything going to be a role at some point? ;) -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http

Re: [Catalyst] ActionClass vs. Moose Role?

2009-08-28 Thread Bill Moseley
On Fri, Aug 28, 2009 at 10:29 AM, Tomas Doran bobtf...@bobtfish.net wrote: On 28 Aug 2009, at 18:25, Bill Moseley wrote: I was starting to implement a custom ActionClass (similar to RenderView) and then wondered if it would be better written as a Moose role. Maybe - depends what you're

Re: [Catalyst] Handling configuration outside the Catalyst application

2009-08-27 Thread Bill Moseley
method to do its work. Wouldn't need to be a web request, of course. Then I've got one access layer to the application and can have ACL rules for the cron user and unified logging. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk

Re: [Catalyst] use base vs use parent

2009-08-25 Thread Bill Moseley
, which isn't defined). Not sure if this is by design or not, but the application base class automatically inherits from Catalyst and Catalyst::Controller. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http

Re: [Catalyst] Inconsistent hierarchy....

2009-08-18 Thread Bill Moseley
the standard NEXT warnings, but that was easy to suppress. I'm very impressed what a good job the Cat developers did making the 5.8 move smooth. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin

Re: [Catalyst] Why no extra attributes on Private actions?

2009-08-17 Thread Bill Moseley
On Sun, Aug 16, 2009 at 10:40 AM, Bill Moseley mose...@hank.org wrote: On Sat, Aug 15, 2009 at 4:28 PM, Eden Cardim edencar...@gmail.com wrote: Is there a specific reason that Private actions may not have additional attributes? You can achieve the same effect by using the :Action tag

Re: [Catalyst] Why no extra attributes on Private actions?

2009-08-17 Thread Bill Moseley
for the config-based approach as you noted. The people with java experience seem to favor the config-based approach. Anyway, I've moved on to obsessing about other things. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http

Re: [Catalyst] Why no extra attributes on Private actions?

2009-08-16 Thread Bill Moseley
. No :Action (or any attribute) required. -- Bill Moseley 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

[Catalyst] Why no extra attributes on Private actions?

2009-08-15 Thread Bill Moseley
reason that Private actions may not have additional attributes? 1 http://www.mail-archive.com/catalyst@lists.scsys.co.uk/msg01403.html -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin

Re: [Catalyst] How to enhance Log4Perl log-files about the loggend in user ($c-user-id)?

2009-07-22 Thread Bill Moseley
On Tue, Jul 21, 2009 at 7:41 AM, Christoph Metz mail-...@web.de wrote: i want to see which debug/error/warn message was logged by which user. I'm using this early in the request after I have $user. Log::Log4perl::MDC-put( 'user', $user-id ); -- Bill Moseley mose...@hank.org

Re: [Catalyst] I18N with quotation marks

2009-07-01 Thread Bill Moseley
(such as: s'il vous plait), then it could break the HTML: select value='[% c.loc(Please select one) %]' I would think the correct approach would be a filter: select value='[% c.loc(Please select one) | html %]' but the default html filter only escapes double quotes. -- Bill Moseley mose

Re: [Catalyst] Session id creation

2009-06-10 Thread Bill Moseley
, not a cache. -- Bill Moseley. mose...@hank.org Sent from my iMutt ___ 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

Re: [Catalyst] Session id creation

2009-06-10 Thread Bill Moseley
On Wed, Jun 10, 2009 at 07:40:44AM -0700, Bill Moseley wrote: [1] Yes, it's a store, not a cache. Ha! Morning post. It's a cache not a store. But we use it as a store. -- Bill Moseley. mose...@hank.org Sent from my iMutt ___ List: Catalyst

Re: [Catalyst] Serving static content from DB

2009-06-07 Thread Bill Moseley
a content delivery network). As mentioned, if you need auth for these files then look into the sendfile and reproxy features of Lighty and Perlbal. Use a dedicated static server for all static content. Then you just need to get uploads redirected there. -- Bill Moseley. mose...@hank.org Sent from my

Re: [Catalyst] best practice: where to put constants

2009-06-04 Thread Bill Moseley
() { $by_name{$name} }; } } return; } 1; -- Bill Moseley. mose...@hank.org Sent from my iMutt ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail

[Catalyst] Plugin::Cache silent failures

2009-05-20 Thread Bill Moseley
if it would be safe to warn on -set() failing in the plugin. -- Bill Moseley mose...@hank.org Sent from my iMutt ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http

Re: [Catalyst] Using test database with TWAM?

2009-04-30 Thread Bill Moseley
is not set the PG* environment variables are used to tell everything what database to use. When Catalyst then goes to load the config an environment variable is set that says to use make_test. It's probably less complex actually than my description above. ;) -- Bill Moseley. mose...@hank.org Sent

Re: [Catalyst] The Netiquette thread (OT)

2009-04-28 Thread Bill Moseley
and hate the lack of trimming even more. Beats the endless scrolling. Oh, and the HTML email on the iPhone... well don't get me started. All will be fine once a native Mutt app for the iPhone comes out. -- Bill Moseley. mose...@hank.org Sent from my iMutt

Re: [Catalyst] unexpected behavior of $c-request-secure and $c-request-base

2009-04-25 Thread Bill Moseley
-secure( 1 ) if $req-header( 'Host' ) =~ /:\d*443$/; return; -- Bill Moseley. mose...@hank.org Sent from my iMutt ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http

<    1   2   3   4   >