Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Moose stringification overloading isn't working

by dd-b (Monk)
on Feb 09, 2013 at 22:05 UTC ( #1017992=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use overload '""' => \&_stringify;
    sub _stringify {
        my $this = shift;           # Actually operator arg, NOT a "this"
        $this->row->ID;
    };
    
  2. or download this
    $logger->trace("Zep is " . ref($zep) . " stringifies as $zep" . " but 
    +_stringify returns " . $zep->_stringify );
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1017992]
Approved by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2014-11-23 13:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (132 votes), past polls