Yeah, you pretty much just wrote what I did in RFC: Class::Proxy::MethodChain. Now make a root node about it, get some well-reasoned skeptic comments, mull over it for a year or so, and then write the code I posted in the root node of this thread. :-) As I said, I've gone through at least a dozen approaches and logical next steps with this thing and it's not likely you'll be able to surprise me as long as you stick to the obvious ideas — sorry.
The problem with this group of solutions, as others said in that thread and as I have come to understand with the experience gained since that node (see Mutator chaining considered harmful), is that method chaining is not a good idea.
Makeshifts last the longest.
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>
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 editor
Want more info? How to link
or How to display code and escape characters
are good places to start.