You could keep a hash of subreferences, and in practice you'll be doing the same thing (the symbol table is a hash),
we're not talking about me having a problem with strict.pm. (1) =)
actually i never used the my $coderef = main->can($subname) thing for projects i'm programming on. just for trying out.
i'm well aware that a hash of subrefs would be the way to go, i just saw that code \&$subname somewhere, and i really never stumbled upon that paragraph in strict.pm where it is documented.
it's just that i usually thought that would require no strict, and i find that in more people's code that they are doing something like that:
no strict; my $ref = \&$name;
so i was really surprised it worked with strict.

(1) i'm using 'no strict' a lot, though, for munging the symbol table (dynmic class generation and things like that)


In reply to Re^2: strict and symbolic subroutine refs by tinita
in thread strict and symbolic subroutine refs by tinita

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.