Let me start by saying I don't buy the inside-out thing, so I'd be disinclined to use Class::Std in the first place. (not a knock on Mssr. Conway, I'm heavy user of his excellent Text::Balanced module)

That being said, Thread::Apartment's use of AUTOLOAD is very focused: its simply a way for client proxies to handle any method an invokant might call, without forcing the proxied object to explicitly install every exported method into the proxy. I had originally considered the latter approach, but soon realized that for some legacy modules (e.g, Perl/Tk), it might be nearly impossible to enumerate all the methods. Note that Thread::Apartment does permit the proxied object to explicitly declare its exported methods to the proxy, but also permits a "wildcard" to permit arbitrary method calls, which can be rejected by the proxied object as needed.

I'd also argue that AUTOLOAD has proven useful to simplify mapping to Web services (see Net::eBay).

However, using AUTOLOAD in an inheritance hierarchy is probably asking for trouble.


In reply to Re^2: Detecting assignment event for AUTOLOAD'd lvalue subs ? by renodino
in thread Detecting assignment event for AUTOLOAD'd lvalue subs ? by renodino

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.