Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jk2addict (4946)

jk2addict
  (email not shown publicly)
http://today.icantfocus.com/blog/
AOL IM: chrislaco (Add Buddy, Send Message)
Yahoo! ID: chrislaco@sbcglobal.net (Add User, Send Message)
Jabber: laco@scribblewerks.com

Journal of jk2addict (4946)

Wednesday May 16, 2007
10:30 AM

In Rant Mode: Part II

[ #33292 ]

So during the usual discussions on #catalyst last night, we came to the following paraphrased topic:

other: mango using Moose?
me: no, but I do have a meta()
other: oh god. don't do that. please.
me: why? my modules, not using moose, meta is fair game. it's just a method.
other: the sky is falling. kittens will die of you do that.

Now, I understand the sentiment. Moose is the hot new thing. And it puts its object meta information in meta(). But hey, that's where I put my object meta information too. So does RDBO. So do other modules. Just telling people to never use a method called meta() is silly in some respects.

If the two need to merge in the future, I surmise that:

use metaclass 'MySpecialMetaClass';

is my friend.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I agree, no module has specific domain over &meta, I am not sure why "other" got so upset.

    I dont know about the other &meta out there, but with Moose we try to always make sure we don't step on other modules toes. And in many cases we avoid calling ->meta and instead fetch the metaclass from the Class::MOP cache in a more direct fashion.

    In fact, Class::MOP (the metaclass system Moose is built on) never insists on &meta and always fetches the metaclass from the cache.

    - Stevan

  • If the two need to merge in the future, I surmise that:

    use metaclass 'MySpecialMetaClass';
    is my friend.

    This will not work as you think, metaclass.pm installs it as &meta too (just like Moose). But we can talk more about the best solution when you get there :)

    - Stevan
  • I always used ->Info in my codegen system's metadata stuff (I was using a rule where any capitalized methods would guarantee to work and never return undef or throw an exception.

    But as I look at moving parts of it to CPAN, I most likely would be using ->meta as well.