## in file Foo.pm: package Foo; use strict; use Class::Multimethods; multimethod new => ('$') => sub { print "I'm the constructor for Foo\n"; bless {},$_[0]; }; 1; ##in file Foo2.pm: package Foo2; use strict; use Class::Multimethods; multimethod new => ('$') => sub { print "I'm the constructor for Foo2\n"; bless {},$_[0]; }; 1; ## in main.pl: package main; use strict; use Foo; use Foo2; Foo->new(); Foo2->new(); ## ==== OUTPUT ==== ## #I'm the constructor for Foo2 #I'm the constructor for Foo2