sub AUTOLOAD { my $connection = $device->getConnection(); { no strict 'refs'; *{ __PACKAGE__ . '::' . $methodname } = $connect->can( $methodname ); } return $connection->$methodName (..); // when called for getVersion, $methodName will become the "getVersion" }