1Template::Plugin::ClassU(s3e)r Contributed Perl DocumentaTteimopnlate::Plugin::Class(3)
2
3
4
6 Template::Plugin::Class - allow calling of class methods on arbitrary
7 classes
8
10 [% USE foo = Class('Foo') %]
11 [% foo.bar %]
12
14 Template::Plugin::Class allows you to call class methods on arbitrary
15 classes. One use for this is in Class::DBI style applications, where
16 you may do somthing like this:
17
18 [% USE cd = Class('Music::CD') %]
19 [% FOREACH disc = cd.retrieve_all %]
20 [% disc.artist %] - [% disc.title %]
21 [% END %]
22
24 You won't be able to directly call "AUTOLOAD" or "DESTROY" methods on
25 the remote class. This shouldn't be a huge hardship.
26
28 Apart from the mentioned caveat, none currently known. If you find any
29 please contact the author.
30
32 Richard Clamp <richardc@unixbeard.net>
33
35 Copyright (C) 2003, 2004, 2006, 2009 Richard Clamp. All Rights
36 Reserved.
37
38 This module is free software; you can redistribute it and/or modify it
39 under the same terms as Perl itself.
40
42 Template
43
44
45
46perl v5.32.1 2021-01-27 Template::Plugin::Class(3)