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

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
                print $mock->fluorinate;
            will print a helpful warning message.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://766428]
Approved by ikegami
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
Find Nodes?
    Voting Booth?

    No recent polls found