Author image Marvin Humphrey
and 1 contributors


Boilerplater::Method - Metadata describing an instance method.


Boilerplater::Method is a specialized subclass of Boilerplater::Function, with the first argument required to be an Obj.

When compiling Boilerplater code to C, Method objects generate all the code that Function objects do, but also create symbols for indirect invocation via VTable.



    my $type = Boilerplater::Method->new(
        class_name   => 'MyProject::FooFactory',    # required
        param_list   => $param_list,                # required
        micro_sym    => 'count',                    # required
        macro_name   => 'Count',                    # required
        class_cnick  => 'FooFact ',                 # default: special 
        docu_comment => $docu_comment,              # default: undef
        abstract     => undef,                      # default: undef
        exposure     => undef,                      # default: 'parcel' 
  • param_list - A Boilerplater::ParamList. The first element must be an object of the class identified by class_name.

  • micro_sym - The lower case name of the function which implements the method.

  • macro_name - The mixed case name which will be used when invoking the method.

  • abstract - Indicate whether the method is abstract. A function body must still be defined.

  • exposure - The scope at which the method is exposed. Must be one of 'public', 'parcel' or 'private'.

  • class_name, class_cnick, docu_comment, see Boilerplater::Function.


Copyright 2006-2009 Marvin Humphrey

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.