# you must call this as a method, and pass it a CODE ref blort->add_method('foo', sub { print 'bar' }); # now you can do this ... blort::foo();