[Catalyst] what is the type of $context?

Daniel McBrearty danielmcbrearty at gmail.com
Fri Jun 9 12:00:56 CEST 2006


or a hash containing a coderef, right?

I looked through the perl documentation a while ago trying to find a
way to get an object to dump a list of all the subs it supports -
introspection. I'd be really surprised if this is not possible, but I
couldn't find a way. Any ideas?

thanks Carl

On 6/9/06, Carl Franks <fireartist at gmail.com> wrote:
> In that case, I've just fired up a cat app to test it - $c is blessed
> into the myApp package (or whatever you chose to call it).
>
> Thinking about it though, I was wrong that it _had_ to be a blessed
> object to be able to call methods on it - $c could also have just been
> a string containing a package name.
> That's a digression though, to answer the original Q, yes it's an object :)
>
> Carl
>
>
> On 09/06/06, Daniel McBrearty <danielmcbrearty at gmail.com> wrote:
> > fair point. I just don't have a working install in front of me, and
> > was wondering. lazy I guess ...
> >
> >
> > On 6/9/06, Carl Franks <fireartist at gmail.com> wrote:
> > > On 09/06/06, Daniel McBrearty <danielmcbrearty at gmail.com> wrote:
> > > > Is it an object in it's own right, or just a hash?
> > >
> > > As you can call methods on it, that means it's a blessed object.
> > > If you need to find what class it's blessed into, do:
> > >     print ref $c;
> > >
> > > You shouldn't need to know whether it's implemented as a hash or not;
> > > if you need to use it to store data, use $c->stash
> > >
> > > Carl
> > >
> > > _______________________________________________
> > > Catalyst mailing list
> > > Catalyst at lists.rawmode.org
> > > http://lists.rawmode.org/mailman/listinfo/catalyst
> > >
> >
> >
> > --
> > Daniel McBrearty
> > email : danielmcbrearty at gmail.com
> > www.engoi.com : the multi - language vocab trainer
> > BTW : 0873928131
> >
> > _______________________________________________
> > Catalyst mailing list
> > Catalyst at lists.rawmode.org
> > http://lists.rawmode.org/mailman/listinfo/catalyst
> >
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>


-- 
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com : the multi - language vocab trainer
BTW : 0873928131



More information about the Catalyst mailing list