package Example;
sub new {
    bless {}
}
sub foo {
    print "this is foo\n";
}
sub bar {
    print "this is bar\n";
}
sub AUTOLOAD {
    my $name = $Example::AUTOLOAD;
    my ($self, @args) = @_;
    print "tried to handle unknown method $name\n";
    if (@args) {
        print "it had arguments: @args\n";
    }
}
sub DESTROY {}          
                        
                        

package main;
my $example = Example->new;

$example->foo;          
$example->bar;          
$example->grill;        
$example->ding("dong");