Re: [Catalyst] Access custom TT filters outside of catalyst context

2008-12-12 Thread Hugh Hunter
This doesn't exactly solve my problem, because I'm not in need of the context object in my view, rather I'm trying to use my view where no context object exists. I solved my issue last night by factoring out my custom filters into a separate module that I could use Template Toolkit proper (rather

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

2008-12-12 Thread Bill Moseley
sub ACCEPT_CONTEXT { my ($self, $c ) = @_; $self = bless({ %$self, path_to = $c-path_to(''), }, ref($self)); return $self; } Sorry, I'm a bit curious about that code. Why is that done that way instead of simply: sub ACCEPT_CONTEXT {

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; } Sorry, I'm a bit curious about that code. Why

Re: [Catalyst] Duplicate entries with C::P::Session::Store::DBIC and MySQL - new findings

2008-12-12 Thread Sergio Salvi
On Thu, Dec 11, 2008 at 12:04 PM, Sergio Salvi sergio.li...@salvi.ca wrote: On Thu, Nov 20, 2008 at 4:49 PM, Tobias Kremer l...@funkreich.de wrote: On 20.11.2008, at 21:16, Sergio Salvi wrote: I still think the final solution (besides finding a way to make find_or_create() atomic), is to

Re: [Catalyst] Access custom TT filters outside of catalyst context

2008-12-12 Thread Kieren Diment
That's the only place to have $c in the entire code, and you only copy over the bits that you want: $self = bless({ %$self, model_accessor = $c-model('MyModel')-whatever, }, ref($self)); return $self; then in view::TT: sub whatever { my $self = @_;

Re: [Catalyst] Access custom TT filters outside of catalyst context

2008-12-12 Thread J. Shirley
On Fri, Dec 12, 2008 at 4:01 PM, Kieren Diment dim...@gmail.com wrote: That's the only place to have $c in the entire code, and you only copy over the bits that you want: $self = bless({ %$self, model_accessor = $c-model('MyModel')-whatever, }, ref($self));