- or download this
package DeepThought;
...
my ($self, $n) = @_;
print "$self says the answer is $n\n";
};
- or download this
use Test::More tests => 2;
...
$o->foo();
ok($ok, 'foo called bar');
};
- or download this
package Foo;
use CGI;
...
my $class = shift;
bless {cgi => CGI->new}, $class;
};
- or download this
use Test::More tests => 1;
...
my $o = Foo->new;
ok($called, 'Foo->new called CGI->new');
};