#!/usr/bin/perl use strict; use warnings; use Foo; my $f=Foo->new; $f->do_cb(sub { my $caller=shift; $caller->warn("no good for me\n"); }); __END__