Re: [Catalyst] Use of memcached with Catalyst

2009-10-30 Thread Bill Moseley
If I restart my apache, it's ok, I'm still > connected when apache restarts. But if I'm connected and I try to go in > another front, I'm not connected: a new session is created. What's another "front"? -- Bill Moseley mose...@hank.org

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

2009-10-24 Thread Bill Moseley
ters ); return; }; Although I 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

Re: [Catalyst] Re: Validating single arg id

2009-10-21 Thread Bill Moseley
22 - view (GET) update (PUT/POST) /forum/post/delete/22 And it's very DRY because there's separate model method for each. The create method may have a different URL structure to specify the topic, or it might be ?topic=123, or it might be part of the post parameters. --

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

2009-10-17 Thread Bill Moseley
ut, assumes web requests are serial in nature, which they are not. So, it's not that simple to just send back a new session id every request or ever few minutes. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo

Re: [Catalyst] Re: Validating single arg id

2009-10-17 Thread Bill Moseley
to validate id doesn't it seems like find() (or really 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.o

Re: [Catalyst] Validating single arg id

2009-10-16 Thread Bill Moseley
o might as well just override find (or really search_rs, as that is what is called by find) and check id (or ids) there. But, there need to think about "where", "columns", and so on. -- Bill Moseley mose...@hank.org ___ List: Catalys

[Catalyst] Validating single arg id

2009-10-16 Thread Bill Moseley
r non-integer key). What's you approach to validating 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 a

Re: [Catalyst] Choosing the language

2009-10-12 Thread Bill Moseley
oller/action and not in every > action separately. > The wiki article Larry 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/cata

[Catalyst] Adding default query parameters to generated links.

2009-10-12 Thread Bill Moseley
rs back in? -- 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] Deployment in practice

2009-10-11 Thread Bill Moseley
pt that makes the database changes, populates tables and runs tests. Once changes are in the database tests can be run against a snapshot of the production db instead of the test database. I'd like to have it more automated, but it seems like every database change requires someth

Re: [Catalyst] Deployment in practice

2009-10-10 Thread Bill Moseley
isting server, move symbolic links, start the server back up and then use wget to validate a number of test URLs. 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 symlin

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

2009-10-01 Thread Bill Moseley
So, If you ♥ chained that much I'll belive you have something great and I'd love to see more real-world examples. Thanks, -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.

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

2009-09-30 Thread Bill Moseley
Granted, now there's $c->go to do a full dispatch, but redirect seems cleaner at the expense of a redirect. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/l

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

2009-09-30 Thread Bill Moseley
>redirect( '/login' ); # require login return 0; # abort request and go immediately to end() } return 1; # success; carry on to next action } RFC3986 has: absolute-URI = scheme ":" hier-part

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

2009-09-30 Thread Bill Moseley
on to have an access level specified or be blocked). I also do not detach to a login page, rather I always redirect. 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 i

Re: [Catalyst] selectively using the wrapper

2009-09-16 Thread Bill Moseley
On Wed, Sep 16, 2009 at 9:11 AM, Ascii King 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 pa

Re: [Catalyst] selectively using the wrapper

2009-09-16 Thread Bill Moseley
wrappers based on page.layout set in the base template. IIRC, I use page.layout (instead of say just "layout") because WRAPPER does a shallow localization of the stash. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk L

Re: [Catalyst] Fetching URL Content

2009-09-02 Thread Bill Moseley
er* using that. Use a cron job to update local templates if you must. -- 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

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

2009-09-02 Thread Bill Moseley
On Wed, Sep 2, 2009 at 7:30 AM, Tomas Doran wrote: > Bill Moseley wrote: > >> I also tried with Catalyst::ClassData. Must be missing something. >> > > Nope, you're not missing anything - class data in roles doesn't play > nicely. > > This would all b

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

2009-09-02 Thread Bill Moseley
(begin|end|auto) 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.c

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

2009-09-02 Thread Bill Moseley
by2:~/MyApp$ script/myapp_test.pl / Could not load class (MyApp) because : Could not load class (Catalyst::Plugin::Role) because : Can't locate object method "mk_classdata" via package "Catalyst::Plugin::Role" at /home/moseley/MyApp/script/../lib/Catalyst/Plugin/Role.pm

Re: [Catalyst] ActionClass vs. Moose Role?

2009-08-28 Thread Bill Moseley
On Fri, Aug 28, 2009 at 10:29 AM, Tomas Doran 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. >> > > May

[Catalyst] ActionClass vs. Moose Role?

2009-08-28 Thread Bill Moseley
That way multiple roles could 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/cat

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

2009-08-28 Thread Bill Moseley
/../$base_app/. Seems there was some discussion not too long ago of drop-in modules 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/cg

Re: [Catalyst] Handling configuration outside the Catalyst application

2009-08-27 Thread Bill Moseley
#x27; )->remove_old; Then it's just ./clean_foo --mode=production --minutes_old=120 But, now I'm thinking about making all access go through Catalyst. That is, a cron job would log in via the API and then use and API method to do its work. Wouldn't need to be a web req

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

2009-08-27 Thread Bill Moseley
ase file names, right? That is, shouldn't that be "myapp.yml"? -- 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] use base vs use parent

2009-08-25 Thread Bill Moseley
e in the Intro which shows "use parent." (The CatAndMoose page also shows $app, 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...@han

Re: [Catalyst] Inconsistent hierarchy....

2009-08-18 Thread Bill Moseley
d 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
ches at this time, so it may turn out that we go 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 _

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 wrote: > > > On Sat, Aug 15, 2009 at 4:28 PM, Eden Cardim wrote: > >> >> > Is there a specific reason that Private actions may not have additional >> > attributes? >> >> You can achieve the same ef

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

2009-08-16 Thread Bill Moseley
configured "actions" method names are just pushed onto the list of method names returned by $meta->get_nearest_methods_with_attributes. No ":Action" (or any attribute) required. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listi

[Catalyst] Why no extra attributes on Private actions?

2009-08-15 Thread Bill Moseley
for that change offers no hints. Is there a specific 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

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 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 ); -- Bi

Re: [Catalyst] I18N with quotation marks

2009-07-01 Thread Bill Moseley
s > (such as: s'il vous plait), then it could break the HTML: > > I would think the correct approach would be a filter: but the default html filter only escapes double quotes. -- Bill Moseley mose...@hank.org ___ List: Catalyst@

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 ___ L

Re: [Catalyst] Session id creation

2009-06-10 Thread Bill Moseley
mply returned the supplied id. It's our own fault for overriding private methods. [1] Yes, it's a store, not a cache. -- Bill Moseley. mose...@hank.org Sent from my iMutt ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsy

Re: [Catalyst] Serving "static" content from DB

2009-06-07 Thread Bill Moseley
it with expire headers way into the future and then let the front-end proxy cache (or better use 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 conte

[Catalyst] Session id creation

2009-06-06 Thread Bill Moseley
validation will work warn "setting _sessionid($sid)\n"; $c->_sessionid($sid); return $sid; } ... Which sets the session id as long as it passes: sub validate_session_id { my ( $c, $sid ) = @_; $sid and $sid =

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

2009-06-04 Thread Bill Moseley
} else { croak "Constant '$name' not found" unless exists $by_name{$name}; my $sub_name = $caller_pkg . '::' . $name; *{$sub_name} = sub() { $by_name{$name} }; } } return; } 1; -- Bill Moseley. mose...@ha

[Catalyst] Plugin::Cache silent failures

2009-05-20 Thread Bill Moseley
can silently fail. I wonder 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

Re: [Catalyst] Using test database with TWAM?

2009-04-30 Thread Bill Moseley
for a database from a common module. That module figures out where the application home is and loads the config. It's loaded in "make_test" mode by default. Since the dsn is not set the PG* environment variables are used to tell everything what database to use. When Catalyst then

Re: [Catalyst] The Netiquette thread (OT)

2009-04-28 Thread Bill Moseley
e I kind of like the top posting 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..

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

2009-04-25 Thread Bill Moseley
On Sat, Apr 25, 2009 at 04:23:50PM -0400, Hans Dieter Pearcey wrote: > On Sat, Apr 25, 2009 at 06:29:50AM -0700, Bill Moseley wrote: > > The SSL decryption is happening on Apache and Apache is proxying the > > request to Catalyst. > > What? No it isn't. It's usi

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

2009-04-25 Thread Bill Moseley
27;X-Ssl' ); return; } # Determine if we are in SSL mode using crude match $req->secure( 1 ) if $req->header( 'Host' ) =~ /:\d*443$/; return; -- Bill Moseley. mose...@hank.org Sent from my iMutt ___ List

Re: [Catalyst] Re: Including a submenu

2009-04-07 Thread Bill Moseley
age = 'foo'; PROCESS "$foo/bar.tt" %]' | tpage --noabsolute file error - /bar.tt: absolute paths are not allowed (set ABSOLUTE option) If you want to process a variable try this: echo '[% page = "foo"; menu = "$page/bar.tt"; PROCESS $menu %]

Re: [Catalyst] Including a submenu

2009-04-06 Thread Bill Moseley
> [% INCLUDE "$page/menu.tt2" %] Try this: [% menu = "$page/menu.tt"; PROCESS $menu; %] -- Bill Moseley. mose...@hank.org Sent from my iMutt ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://list

Re: [Catalyst] Announce: HTML::FormHandler

2009-03-24 Thread Bill Moseley
and out of the model layer via "forms". Indeed, my application's API use Form::Processor as well as command line scripts -- and there's no HTML in those actions. -- Bill Moseley. mose...@hank.org Sent from my iMutt ___ List: Cat

Re: [Catalyst] OT: edit/add seperate actions?

2009-03-03 Thread Bill Moseley
7;, 'user.get' ) { my ( $self, $c, $id ) = @_; $c->post_redirect( 'list', 'Foo' ) if $c->update_from_form( $id ); } So the same form validation is used for create and update via the API, and the xmlrpc code knows how to wrap that ac

Re: [Catalyst] IO::Pipe and the Catalyst Server

2009-02-26 Thread Bill Moseley
Hi Florian, You asked for a test. Did this get applied? On Thu, Feb 05, 2009 at 09:25:34AM -0800, Bill Moseley wrote: > On Thu, Feb 05, 2009 at 04:28:57PM +0100, Florian Ragwitz wrote: > > On Thu, Feb 05, 2009 at 07:10:07AM -0800, Bill Moseley wrote: > > > Same problem. >

Re: [Catalyst] Requirements for Catalyst

2009-02-25 Thread Bill Moseley
that processes grew large over time. Limiting requests/child has kept me out of swap, though. > Admittedly this looks like an awfully simple app, there doesn't seem > an obvious leak here. Hence we wondering if your rather odd-looking > test is to blame. > > What versions of

Re: [Catalyst] Requirements for Catalyst

2009-02-25 Thread Bill Moseley
} sub make_request { my $request = Catalyst::Utils::request( '/ping' ); my $cgi = HTTP::Request::AsCGI->new( $request, %ENV )->setup; App->handle_request; return $cgi->restore->response; } package App; use strict; use warnings; use Catalyst; sub ping

Re: [Catalyst] stripping path parts and then redispatch?

2009-02-24 Thread Bill Moseley
t here: http://dev.catalyst.perl.org/wiki/wikicookbook > >>>> $c->SUPER::prepare_path(@_); >>>> > > Tiny nit pick - you probably want to say $c->next::method(@_) rather > than SUPER::. Or what I sent to Larry: $c->NEXT::prepare_path; At what cat

Re: [Catalyst] Re: decoding in core

2009-02-23 Thread Bill Moseley
f the application, and that would be in the Engine (or the code the Engine uses). Yes, the same thing has to happen with templates, the database, and all external data sources. Those are separate issues. HTTP provides a standard way to determine how to encode and decode. --

Re: [Catalyst] stripping path parts and then redispatch?

2009-02-22 Thread Bill Moseley
ly overridden prepare_path and then removed the prefix (e.g. the language) from the path, set a flag, and then appended it on $req->base. -- Bill Moseley mose...@hank.org Sent from my iMutt ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://

Re: [Catalyst] Re: template design issue: varibales stand-alone components

2009-02-22 Thread Bill Moseley
uch power (to abuse) but that kind of usage really helps keep the controllers clean. The controller converts the request for a user into a user object, but it's up to the view to decide to display the user's first name only or their full name, IMO. -- Bill

Re: [Catalyst] Re: decoding in core

2009-02-22 Thread Bill Moseley
ode() and I think that's a no-op if the content has already been decoded (utf8 flag is already set). Likewise, it only encodes if the utf8 flag is set. So, users of that plugin should be ok if character encoding was handled in core and they don't remove the plugin. -- Bill Moseley mose...@h

Re: [Catalyst] Re: decoding in core (Was: [Announce] Catalyst-Runtime-5.8000_05)

2009-02-06 Thread Bill Moseley
On Fri, Feb 06, 2009 at 03:16:14PM +, Tomas Doran wrote: > > On 6 Feb 2009, at 14:46, Bill Moseley wrote: >> Nobody responded to the main point of this email -- if Catalyst should >> handle encoding in core instead of with a plugin. Nobody has an >> opinion about

Re: [Catalyst] Re: decoding in core (Was: [Announce] Catalyst-Runtime-5.8000_05)

2009-02-06 Thread Bill Moseley
On Fri, Jan 30, 2009 at 11:44:57PM +0100, Aristotle Pagaltzis wrote: > * Bill Moseley [2009-01-29 17:05]: > > Neither of the existing plugins do it correctly (IMO), as > > they only decode parameters leaving body_parameters as octets, > > and don't look at the req

Re: [Catalyst] IO::Pipe and the Catalyst Server

2009-02-05 Thread Bill Moseley
On Thu, Feb 05, 2009 at 04:28:57PM +0100, Florian Ragwitz wrote: > On Thu, Feb 05, 2009 at 07:10:07AM -0800, Bill Moseley wrote: > > Same problem. > > Would you mind preparing a testcase for this? I can try. See attached diff against svn 9215. $ prove -vl t/live_fork.t t/live

Re: [Catalyst] Re: Hello, Deployment of Catalyst apps in a shared web hosting account without shell

2009-02-05 Thread Bill Moseley
/css/logo2.png FAILED - http://www.djmag.bg/static/css/forum.png FAILED - http://www.djmag.bg/static/css/events.png FAILED - http://www.djmag.bg/static/banners/208781512_160x600.swf FAILED - http://www.djmag.bg/static/css/webface.png ETag score

Re: [Catalyst] IO::Pipe and the Catalyst Server

2009-02-05 Thread Bill Moseley
On Thu, Feb 05, 2009 at 01:23:03PM +0100, Florian Ragwitz wrote: > On Wed, Feb 04, 2009 at 10:25:15PM -0800, Bill Moseley wrote: > > I have a module that uses IO::Pipe and when I run it under the > > Catalyst server the pipe doesn't work (see below). > > Please try

[Catalyst] IO::Pipe and the Catalyst Server

2009-02-04 Thread Bill Moseley
server at http://bumby2:3000 about to read from handle hello Looks like my pipe is leaking. Again, if I run the app under mod_perl it works as expected. I might try IPC::Cmd next. -- Bill Moseley mose...@hank.org Sent from my iMutt ___ List:

Re: [Catalyst] template design issue: varibales stand-alone components

2009-02-04 Thread Bill Moseley
Wrapper templates handle everything else (menus, layout, columns, banners, everything) is pulled in from nested wrapper templates. It's very rare that an include file is referenced more than once. Also, this makes me cringe a bit: Dear Dr. <% $surname %>! I would think you would hi

decoding in core (Was: [Catalyst] [Announce] Catalyst-Runtime-5.8000_05)

2009-01-29 Thread Bill Moseley
charset specified in the request? -- 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/cataly

Re: RE: [Catalyst] generic way of "session has expired" message?

2009-01-29 Thread Bill Moseley
are asked for their login again. And it doesn't really change the fact that they must log in again. People seem to understand that you can get logged out for inactivity. -- Bill Moseley mose...@hank.org Sent from my iMutt ___ List: Catalyst@li

Re: [Catalyst] how to confirm before deleteing

2009-01-21 Thread Bill Moseley
licked that big fat delete button. The javascript confirmation is easy, and I do it all the time, but when not so lazy and the action lends itself I provide an undelete option afterwards for those rare "oops" times. -- Bill Moseley mose...@hank.org Sent from my iMutt

Re: [Catalyst] Catalyst::Plugin::Session - please help test new release.

2009-01-12 Thread Bill Moseley
On Tue, Jan 13, 2009 at 01:34:11AM +, Tomas Doran wrote: > > On 12 Jan 2009, at 19:41, Bill Moseley wrote: > >> On Mon, Jan 12, 2009 at 05:30:08AM +, Tomas Doran wrote: >>> >>> I'm reasonably sure that it's all working as expected, but I want

Re: [Catalyst] Catalyst::Plugin::Session - please help test new release.

2009-01-12 Thread Bill Moseley
causing > issues for anybody. Might consider creating a md5 signature when calling initialize_session_data. We use that to prevent writing to the session store when not needed (i.e. empty sessions). -- Bill Moseley mose...@hank.org Sent from my iMutt _

Re: [Catalyst] Best practice for database connections, where $c is not available?

2008-12-31 Thread Bill Moseley
want more control over w/o having to update the application. On another project I set up TT vmethods that defined a number of formats and then in the template I would do: [% item.start_time.full_date %] or [% item.start_time.time_with_zone %] But, I'm not sold on that approach. -

Re: [Catalyst] Unnecessary session writes

2008-12-29 Thread Bill Moseley
d patches. Two I just came across in the last week are it throwing an exception on invalid session id (instead of just ignoring like a missing one), and the "cookie_secure" feature that indeed sets the cookie as "secure" but doesn't prevent it from being sent in a non-SS

Re: [Catalyst] Tracking down memory leaks

2008-12-24 Thread Bill Moseley
->dispatch; $status = $c->finalize; use Devel::Cycle; #find_cycle( $c ); }; Devel::Leak::CheckSV($handle); Then I get a bunch of output like: new 0xac62a60 : new 0xac62a70 : new 0xac62a80 : new 0xac62a90 : By a "bunch" I mean 16,979. So, I don&

[Catalyst] Tracking down memory leaks

2008-12-24 Thread Bill Moseley
no gain in rss. #return; App->handle_request; return $cgi->restore->response; } package App; use strict; use warnings; use Catalyst; sub ping : Local { my ( $self, $c ) = @_; $c->res->body( 'ping' ); } -- Bill Moseley mose...@hank.org Se

Re: [Catalyst] Re: System call problem

2008-12-24 Thread Bill Moseley
require Sys::Hostname; $host = lc Sys::Hostname::hostname(); } else { $host = gethostbyaddr( $addr, AF_INET ) || inet_ntoa($addr); } Is that IGNORE for calling `hostname`? Or for the later fork()? And if it's for the late fork() why IGNORE over wait? I

Re: [Catalyst] OT: Better TT pager?

2008-12-23 Thread Bill Moseley
ot; IF page_nav.previous %] [%- FOR p = page_nav.pages %] [% p %] [%- END %] [%- "$page_nav.next" IF page_nav.next %] [% END %] -- Bill Moseley mose...@hank.org Sent from my iMutt ___

Re: [Catalyst] Unnecessary session writes

2008-12-17 Thread Bill Moseley
On Wed, Dec 17, 2008 at 08:34:36AM +, Tomas Doran wrote: > > On 17 Dec 2008, at 05:11, Bill Moseley wrote: > >> On Tue, Dec 16, 2008 at 06:20:43PM +, Tomas Doran wrote: >>> Do you fancy writing a test for the issue so we can actually prove >>> it is >

Re: [Catalyst] Unnecessary session writes

2008-12-16 Thread Bill Moseley
'call $c->session' ); ok( !$wrote_session, 'Did not write session on read only' ); But, the plugin also always writes an "expires:" key into the store (hence the /^session:/ match above), so if the goal is to not write to the store unless there's something

Re: [Catalyst] http://www.catalystframework.org/calendar/2008/8

2008-12-12 Thread Bill Moseley
On Fri, Dec 12, 2008 at 08:37:25AM -0800, Bill Moseley wrote: > sub ACCEPT_CONTEXT { > my ($self, $c ) = @_; > $self = bless({ %$self, > path_to => $c->path_to(''), > }, ref($self)); > return $self; > } >

[Catalyst] http://www.catalystframework.org/calendar/2008/8

2008-12-12 Thread Bill Moseley
sub ACCEPT_CONTEXT { my ($self, $c ) = @_; $self->path_to( $c->path_to('') ); return $self; } Which would also avoid calling DESTROY every request. -- Bill Moseley mose...@hank.org Sent from my iMutt ___ List: Cata

[Catalyst] Unnecessary session writes

2008-12-10 Thread Bill Moseley
n_data) ); return $c->_session($session_data); } That won't help if you do this, of course: my $lang = $c->session->{user_prefs}{language} || 'en'; -- Bill Moseley [EMAIL PROTECTED] Sent from my iMutt ___ List: Cat

Re: [Catalyst] [Announce] Catalyst-Runtime 5.8000_04 shipped to CPAN

2008-12-08 Thread Bill Moseley
the most damage: require App::Model::Foo was successful but the package is not defined which is not entirely clear what that means. -- Bill Moseley [EMAIL PROTECTED] Sent from my iMutt ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://li

Re: [Catalyst] Perl 5.10 warnings. ("used only once")

2008-11-06 Thread Bill Moseley
On Mon, Nov 03, 2008 at 07:18:46AM -0800, Bill Moseley wrote: > I know some of this has been discussed: > > http://www.mail-archive.com/catalyst@lists.scsys.co.uk/msg02634.html > > I installed Perl 5.10 and Catalyst 5.7015, and now "make test" > generates lots

Re: [Catalyst] Perl 5.10 warnings.

2008-11-03 Thread Bill Moseley
On Mon, Nov 03, 2008 at 07:18:46AM -0800, Bill Moseley wrote: > > Another issue I have to look into is query_form() in > /usr/share/perl5/URI/_query.pm is getting passed utf8 strings, which > I'm not sure was happening before 5.10. (My version of query_form > warns if this ha

[Catalyst] Perl 5.10 warnings.

2008-11-03 Thread Bill Moseley
;m not sure was happening before 5.10. (My version of query_form warns if this happens). That method must work with octets, something I discussed on the LWP list on September 18 and 19, -- Bill Moseley [EMAIL PROTECTED] Sent from my iMutt ___ List: C

Re: [Catalyst] Re: PDF creation in Catalyst?

2008-10-22 Thread Bill Moseley
Fs for various documents that probably could have been just as useful as HTML (with print style sheets). -- Bill Moseley [EMAIL PROTECTED] Sent from my iMutt ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/lis

Re: [Catalyst] Feature Request: Parameter Junctions

2008-10-22 Thread Bill Moseley
Now safely use your validated input. my $form = $c->stash->{form}; my $sport = $form->value( 'sport' ); ... } Fields that accept only scalars only validate for single values, etc. Parameter validation doesn't have to be just for posted form

Re: [Catalyst] Re: CSRF (plus session security)

2008-10-01 Thread Bill Moseley
n and also $c->secure_session as separate sessions and separate cookies. -- Bill Moseley [EMAIL PROTECTED] Sent from my iMutt ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive

Re: [Catalyst] Passing UTF-8 arg in URL to DBIC search

2008-09-30 Thread Bill Moseley
the trick for you. I think Encode::decode_utf8() the recommended method over using the utf8::decode call. Perhaps something like this early in the request: $c->req->arguments( [ map { Encode::decode_utf8($_) } @{$c->req->arguments} ] ); But,

Re: [Catalyst] Passing UTF-8 arg in URL to DBIC search

2008-09-27 Thread Bill Moseley
ought you would have to url-encode it, but maybe the browser will do that. Although, I'm not clear how it knows what encoding to use. [1] also note that it doesn't decoded the body params, so if you access those via the body_parameters request method they won't be decoded. Accessi

Re: [Catalyst] Pushing data to Catalyst powered web page

2008-09-12 Thread Bill Moseley
On Fri, Sep 12, 2008 at 02:15:23PM +0200, Supra, Morne wrote: > > The problem that I have is that I have no idea how to push the data to a > web page instead of pulling. Pull with an AJAX update, perhaps. -- Bill Moseley [EMAIL PROTECTED] Sent from

[Catalyst] HTTP::Body, Catalyst, and death.

2008-08-06 Thread Bill Moseley
In other words, is it important that HTTP::Body's add() method (and really, spin() ) not die and instead continue to, well, spin until all the request data has been consumed? -- Bill Moseley [EMAIL PROTECTED] Sent from my iMutt ___ L

Re: [Catalyst] Apache2::RequestIO::read problem

2008-07-28 Thread Bill Moseley
these, too. I've not been too worried, and I've been assuming that Apache is just falling back to the default handler for some reason. There's a little info to be found with Google -- mostly others asking the same question. It would be nice to have these fail in a cleaner way (as fa

Re: [Catalyst] API Versioning for Web Services

2008-07-28 Thread Bill Moseley
t:3000/rpc/1.3 or http://localhost:3000/rpc?version=1.2 -- Bill Moseley [EMAIL PROTECTED] 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.ma

Re: [Catalyst] API Versioning for Web Services

2008-07-27 Thread Bill Moseley
dual methods. That is, have separate method names that include a version: widget.1.get widget.2.get etc. which would make the Catalyst part very simple, but I'm not sure I like that idea of each method having a version in the method name. -- Bill Moseley [EMAIL P

[Catalyst] API Versioning for Web Services

2008-07-25 Thread Bill Moseley
get_old : XMLRPC( 'widget.get' ) Version( 1 ) { Then in my custom API dispatcher match method I take the version into consideration when matching actions. Any better suggestions? -- Bill Moseley [EMAIL PROTECTED] Sent from my iMutt _

Re: [Catalyst] Using a post argument in a template

2008-07-25 Thread Bill Moseley
> > > > -- > > edenc.vox.com > > > > > ___ > List: Catalyst@lists.scsys.co.uk > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: http://www.mail-archive.com/catalyst@list

Re: [Catalyst] Preventing simultaneous logins

2008-07-23 Thread Bill Moseley
ou invalidate their first session. -- Bill Moseley [EMAIL PROTECTED] 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@

Re: [Catalyst] Any recommendations for multiple forms in catalyst (have been using HTML::FormFu)?

2008-07-15 Thread Bill Moseley
rm class knows to save their data in the session (except third_step which writes all the form data). They also know how to pre-populate the form from a previous submission (for example, if someone goes from form three back to form one. update_from_form() knows the form class from the action name,

Re: [Catalyst] Capture page on server?

2008-06-23 Thread Bill Moseley
.cpan.org/dist/Catalyst-Plugin-Cache/lib/Catalyst/Plugin/Cache.pm > ? Or even: http://search.cpan.org/~agrundma/Catalyst-Plugin-PageCache-0.18/ -- Bill Moseley [EMAIL PROTECTED] Sent from my iMutt ___ List: Catalyst@lists.scsys.co.uk Listinfo:

Re: [Catalyst] Another newbie question...

2008-06-09 Thread Bill Moseley
ameters->{foo} is the raw posted data. I would assume it could be different if the form validation process modified the input data. For example, in Form::Processor, a date input might be one or more elements of $c->req->parameters, but you would access it as $form->field('some

Re: [Catalyst] ANNOUNCE: Catalyst::Devel 1.07 and Catalyst::Manual 5.7012 released to CPAN

2008-06-03 Thread Bill Moseley
n example of a case where POD and YAML were causing new users confusion? -- Bill Moseley [EMAIL PROTECTED] Sent from my iMutt ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable a

<    1   2   3   4   5   >