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
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 {
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
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
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 = @_;
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));