Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Innovative. Thanks for sharing this.

    I wish for customizing the name of "$self", but this is a nice start, and a welcome competitor to "self.pm", which I also liked it was a little weird because it was "self", not "$self", and didn't actually allow you to "shift" off $self through the system, just reference it.

    Wow, that was a run-on sentence.

          Mark
    • Mark: You just inspired me to write selfvars.pm, now on CPAN. :-)
      • by hex (3272) on 2007.12.28 20:04 (#59813) Homepage Journal
        That's beautiful, Audrey, thank you. One thought - I always pass by reference, that is to say, $vars. If that could make it into a future selfvars.pm as an option, it would be awesome.
        • Do you mean that you always pass a single by-name hash reference argument, in a PBP-esque fashion?

          $obj->meth({ a => 1, b => 2 });

          If so, how about making available a %opts so you can say:

          sub meth {
              $self->foo($opts{a});
          }

          If you wish you can even import selfvars like this, populating named options into %_:

          use selfvars -opts => '_', -self;
          sub meth {
              $self->foo($_{a});
          }

          Would that resemble what you want?

          • 0.10 of selfvars very definitely resembles what I want. I dub thee Lady Leet of Awesomeland!