[Catalyst] Access custom TT filters outside of catalyst context
J. Shirley
jshirley at gmail.com
Sat Dec 13 04:03:18 GMT 2008
On Fri, Dec 12, 2008 at 4:01 PM, Kieren Diment <diment at 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));
> return $self;
>
> then in view::TT:
>
> sub whatever {
> my $self = @_;
> $self->model_accessor->do_stuff;
> ...
> }
>
But what if $c never exists, because you are writing a command line
application that never invokes Catalyst?
-J
More information about the Catalyst
mailing list