Hm. I like your idea, in some respects, but think the implementation sucks. The idea of exporting functions has no place mixing with object-orented programming, and tied stuff is the ultimate in OOP. (Note: this can either imply that I like both or hate both. That's quite on purpose.)

The way you do this makes Tie::ArrayXYZ more difficult to subclass properly (perhaps not; I havn't looked that deeply. You use isa, which is a good sign), but more importantly, it makes it impossible to name your functions reasonably, since you can't have a methodfunction for the tied object and have a normal function (or even a mehtodfunction of a different tied object) at the same time, since your screwing with your users' namespace. IMHO, what you should be doing is making @tiedarray->mehtod DWIM, which would probably require a METHODCALL tie function.

BTW, rereading this after preview before submit, I noticed that it sounds rather harsh. I didn't mean for it to come out that way, it's just been that kind of qw(day, month, year, lifetime)[rand 3].

-- 
James Mastros, AIM:theorbtwo, PM:theorbtwo, EMAIL:theorb@iname.com 

In reply to Re: Tied variables and functions for them by theorbtwo
in thread Tied variables and functions for them by japhy

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.