[Catalyst] what is the type of $context?

Carl Franks fireartist at gmail.com
Fri Jun 9 21:57:29 CEST 2006


On 09/06/06, Yuval Kogman <nothingmuch at woobling.org> wrote:
> On Fri, Jun 09, 2006 at 11:25:40 +0100, Carl Franks wrote:
>
> > I'd be surprised if there *was* a way to do intropection with perl5.
>
> WTF? Perl is possibly the most lax and free minded language there is
> WRT inrospection. You can even hack in meta classes if you try hard
> enough.
>
> What other language lets you poke around the instance's structure,
> know it's class at runtime, and has a hash as a symbol table?

Daniel defined introspection as: "dump a list of all the subs it supports".
As I said, how can there be a *reliable* way of doing that?

I know I've used autoload in the past to provide getter/setters
without having to copy/paste subs - they would never show up in the
symbol table.
Okay, we've now got cool modules such as Class::Accessor::Fast which
are easer to use than autoload, and which do insert the subs into the
symbol table, but there must be a lot of modules out there that still
do it "the old way".

Would using Class::C3 effect the possible methods, or just the order
of method-calls?
Is it not possible that if a class uses something other than plain
@ISA / SUPER, then simply looking at the symbol table for everything
in @ISA may not be correct?

btw, I don't know the proper definition of "introspection" with regard
to programming - if it's broader than I was using it, then sorry for
any confusion.

Cheers,
Carl



More information about the Catalyst mailing list