Pod::WSDL::AUTOLOAD(3pm)

Pod::WSDL::AUTOLOAD3pm

Base class for autoloading (internal use only)

Usage

  package Foo;
  our @ISA = qw/Pod::WSDL::AUTOLOAD/;
  sub new {
    my $pgk = shift;
    bless {
          _bar => 'blah',
    }, $pgk
  }
  package main;
  use Foo;
  
  my $foo = new Foo();
  print $foo->bar;  # prints 'blah'
  
  $foo->bar('bloerch');  # sets _bar to 'bloerch'

Overview

This module is used internally by Pod::WSDL. It is unlikely that you have to interact directly with it. The Pod::WSDL::AUTOLOADER is used as a base class and handels autoloading of accessor methods. If there is a property called _foo in a hash based blessed reference, it will allow the use of the method 'foo' as a getter and setter. As a getter is returns the value of _foo, as a setter it sets _foo with the argument and returns the object. You can exclude the accessor by using a hash %FORBIDDEN_METHODS in the derived class like that:

  our %FORBIDDEN_METHODS = (
        foo => {get => 1, set => 0},
        bar => {get => 0, set => 0}
  );

In this example it will not be allowed to set _foo and to set or get _bar. If the user of the object tries to do so, it croaks. From within the objects package every accessor is allowed.

Methods

[none]

External dependencies

  Carp;

Examples

see Pod::WSDL

Todo

see Pod::WSDL

Releases

7 releases since Debian 7 (Wheezy); the text changed 3 times.

  1. 7
  2. 8–10
  3. 11
  4. 12–13

Bugs

see Pod::WSDL

Author

Tarek Ahmed, <bloerch -the character every email address contains- oelbsk.org>

From libpod-wsdl-perl 0.063-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.