I'd like to make you feel better by disagreeing, as oddly as that sounds.

It *cannot* be resolved at compile time, because method calls are not resolved at compile time. (That's why prototypes don't work on methods, for example.)

My guess, based on a very quick reading of gv.c (Perl_gv_fetchmeth), is that methods care about their stashes. In other words, the package where a method was defined matters, because that's the first place Perl looks when it's trying to resolve something like this (a variable name, a method call). gv_fetchmeth() attempts to find an appropriate method to call. When '::SUPER' is found, it looks in @ISA available in the current stash.

That's modifiable at run time.

I'm not completely convinced my explanation is right, but I will stake my autographed CowboyNeal photo that it's not compile time. (Now I sit back and wait for Dominus to whack me with a stick of -1, Pedantic and Slightly Incorrect. ;)


In reply to Re: Re: Re: Re: can('SUPER::defaults') by chromatic
in thread can('SUPER::defaults') by kwoff

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.