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)); > 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 _______________________________________________ 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/