Intermediate commit - just have to add/fix POD for two classes, then done
[p5sagit/Excel-Template.git] / lib / Excel / Template / Element / Var.pm
1 package Excel::Template::Element::Var;
2
3 use strict;
4
5 BEGIN {
6     use vars qw(@ISA);
7     @ISA = qw(Excel::Template::Element);
8
9     use Excel::Template::Element;
10 }
11
12 sub resolve { ($_[1])->param($_[1]->resolve($_[0], 'NAME')) }
13
14 1;
15 __END__
16
17 =head1 NAME
18
19 Excel::Template::Element::Var
20
21 =head1 PURPOSE
22
23 To provide parameter substitution.
24
25 =head1 NODE NAME
26
27 VAR
28
29 =head1 INHERITANCE
30
31 Excel::Template::Element
32
33 =head1 ATTRIBUTES
34
35 =over 4
36
37 =item * NAME
38
39 This is the name of the parameter to substitute here.
40
41 =back
42
43 =head1 CHILDREN
44
45 None
46
47 =head1 EFFECTS
48
49 None
50
51 =head1 DEPENDENCIES
52
53 This will only be used within CELL tags.
54
55 =head1 USAGE
56
57 This is used exactly like HTML::Template's TMPL_VAR. There is one exception -
58 since you can have variable names inside the parameters, you can do something
59 like:
60
61   <loop name="LOOPY">
62     <var name="$SomeParam"/>
63   </loop>
64
65 Where the actual name to be substituted is, itself, a parameter.
66
67 =head1 AUTHOR
68
69 Rob Kinyon (rob.kinyon@gmail.com)
70
71 =head1 SEE ALSO
72
73 CELL
74
75 =cut