AUTOLOAD (continued) You must declare the package-global $AUTOLOAD yourself before Perl tries to use it (if you have been using strict and warnings as instructed). When a subroutine is called, Perl looks for it in the proper packages (subject to the inheritance rules described later), and if it doesn't find it, it looks for your subroutine called AUTOLOAD. It sets $AUTOLOAD to the fully-qualified name of the method called (in this case Foo::Bar::foo or Foo::Bar::bar), then calls the subroutine.