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.
  • What about lvalue subs? Say I want to do this:
    $obj->foo = $hash_ref;
    I want to make sure that the foo() method only accepts a hash. Would it be defined like this?
    sub foo : method(HASH $x){
       $x->{whatever} = 1;
    }
    I may have the syntax wrong - it's been a while since I played with lvalue subs. But, I think you see what I'm trying to do. Possible?