Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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: (5)
As of 2014-12-29 05:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (184 votes), past polls