View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Matthew Simon Cavalletto > Class-MakeMethods-1.009 > Class::MakeMethods::Autoload



Annotate this POD


New  2
Open  3
View/Report Bugs
Module Version: 1   Source   Latest Release: Class-MakeMethods-1.01


Class::MakeMethods::Autoload - Declare generated subs with AUTOLOAD


  package MyObject;
  use Class::MakeMethods::Autoload 'Standard::Hash::scalar';
  package main;
  my $obj = bless {}, 'MyObject';
  print $obj->foo();


This package provides a generate-on-demand interface to Class::MakeMethods.

When your class uses this package, it imports an AUTOLOAD function that resolves missing methods by using Class::MakeMethods to generate and install a standard type of method.

You must specify the type of method to be generated by passing a single argument to your use Class::MakeMethods::Autoload statement, which can take any of these forms:


The following warnings and errors may be produced when using Class::MakeMethods::Attribute to generate methods. (Note that this list does not include run-time messages produced by calling the generated methods, or the standard messages produced by Class::MakeMethods.)

No default method type; can't autoload

You must declare a default method type, generally by passing its name to a use Class::MakeMethods::Autoload statement, prior to autoloading any methods.

Construction of %s method %s failed to produce usable method

Indicates that Autoload succesfully called Class::MakeMethods->make to generate the requested method, but afterwards was not able to invoke the generated method. You may have selected an incompatible method type, or the method may not have been installed sucesfully.


See Class::MakeMethods for general information about this distribution.

syntax highlighting: