Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Test::MockObject not showing args when mocking a sub

by jvector (Friar)
on May 27, 2009 at 14:08 UTC ( [id://766428]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        $port = new Device::SerialPort("/dev$opt_p");
    
  2. or download this
    write_chunk ("modem control stuff");
    
  3. or download this
    sub write_chunk {
        (my $count) = $port->write($_[0]);
    }
    
  4. or download this
    if ($TESTING) {
        use Test::MockObject;
    ...
    else {
        $port = new Device::SerialPort("/dev/$opt_p");
    }
    
  5. or download this
    wrote ATZ\r to the serial port
  6. or download this
    wrote Test::MockObject=HASH(0x885d760) to the serial port
  7. or download this
        * "mock(*name*, *coderef*)"
            Adds a coderef to the object. This allows code to call the nam
    +ed
    ...
                print $mock->fluorinate;
    
            will print a helpful warning message.
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-04-23 13:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found