# 2A. not very anal sub load { # actually, module can be in the form of "Foo::Bar" or "Foo/Bar.pm". # but will be canonicalized to "Foo/Bar.pm" form my $module = shift; if ($module =~ /\A\w+(::\w+)*\z/) { $module = join("/", split /::/, $module) . ".pm"; } ... }