Template::Plugin::Class(3pm)

Template::Plugin::Class3pm

Allow calling of class methods on arbitrary classes

Usage

  [% USE foo = Class('Foo') %]
  [% foo.bar %]

Overview

Template::Plugin::Class allows you to call class methods on arbitrary classes. One use for this is in Class::DBI style applications, where you may do somthing like this:

  [% USE cd = Class('Music::CD') %]
  [% FOREACH disc = cd.retrieve_all %]
  [% disc.artist %] - [% disc.title %]
  [% END %]

Caveats

You won't be able to directly call "AUTOLOAD" or "DESTROY" methods on the remote class. This shouldn't be a huge hardship.

Releases

11 releases since Debian 3.1 (Sarge); the text changed 5 times.

  1. 3.1
  2. 4.0–5.0
  3. 6.0–8
  4. 9–10
  5. 11
  6. 12–13

Bugs

Apart from the mentioned caveat, none currently known. If you find any please contact the author.

Author

Richard Clamp <[email protected]>

From libtemplate-plugin-class-perl 0.14-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.