To follow up yet again, I did find something that might help, but will lead into a worse dead end.
That is, if you call a function via the amperstand approach, with no arguements, the current value of @_ is passed along to that function. So in my case:
$test->execute( sub { print "in the local coderef\n";
&MyPackage::helper; } );
the value of @_ that helper() sees would be whatever execute() left @_ as, so here, I could easily fill up @_ with $self and any other variables that I wish. However... some of the functions of similar nature to helper that I have planned would also require user-added arguments, and thus this completely breaks down, since specifying any arguements does not pass @_ further.
I think what I will end up doing is forcing the user to specify "$self->helper", and then remove any variables that would be passed to the help functions from access by the user.
</CODE>
Dr. Michael K. Neylon - mneylon-pm@masemware.com
||
"You've left the lens cap of your mind on again, Pinky" - The Brain
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.