Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Why mock doesn't work in this case?

by tobyink (Abbot)
on Jan 06, 2012 at 10:05 UTC ( #946571=note: print w/ replies, xml ) Need Help??


in reply to Why mock doesn't work in this case?

Son::new doesn't return the blessed object. Try:

sub new { *{'Father::alert'} = sub { print 'son' . $/; }; bless {}, Son; }


Comment on Re: Why mock doesn't work in this case?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (13)
As of 2014-08-01 14:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (25 votes), past polls