Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Re Class::MOP::Method::Wrapped: Out of curiosity, does it gather all the before/after/around stuff into one thoughtful list, or does it just keep chaining things with more single-use wrappers?

And I was wondering... how does an 'after' method get called without having the wrapper show up in the call stack? If the original is chained to with a GOTO, it won't get control back again.

Moose and Class::MOP make a distinction between methods defined in your class, and functions imported from other modules.
Yea, that's what "no moose" and "autoclean" is all about. So, the method enumerator does the same thing as autoclean, and they work by comparing the name recorded in the function itself with the name it's being accessed under, to tell if it was not imported.

Let me see if I'm following... for code that's been generated or otherwise not created using the classic 'sub' at package level, it won't record that origin and would always look like it was imported, even for generated methods like the accessors. So what that passage was trying to say is that a fully-quallified name in the Sub::Name or the natural origin of the function is used to determine if it was imported. Right?

From reading Sub::Name, I thought that it simply records what you wanted in the same spot that a natural born sub does anyway. You talk about "B" and "stash" and other things not in my namespace, which makes me think now that the determination of the natural born name was not something it was originally meant to do. So Sub::Name is a newer thing and Carp et al. were updated to look at it, but defining a sub still doesn't populate that itself?

Re Welcome to the twisty maze: Thanks.


In reply to Re^2: A couple questions on Moose::MOP::Class by John M. Dlugosz
in thread A couple questions on Moose::MOP::Class by John M. Dlugosz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (2)
As of 2021-10-24 10:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (89 votes). Check out past polls.

    Notices?