X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FExcel%2FTemplate%2FContext.pm;h=d7218af342922210c5142fdc38f816896d82abfa;hb=c11fa570a52d9613e40c4c80e22302c2a5caca70;hp=c8fe40acfb3f5b7760c2a3054db124a8a1699c2a;hpb=6dd4c89d686d215eb0de41e8a2f7805bfc7eb188;p=p5sagit%2FExcel-Template.git diff --git a/lib/Excel/Template/Context.pm b/lib/Excel/Template/Context.pm index c8fe40a..d7218af 100644 --- a/lib/Excel/Template/Context.pm +++ b/lib/Excel/Template/Context.pm @@ -29,8 +29,11 @@ sub new $self->{ACTIVE_FORMAT} = Excel::Template::Format->blank_format($self); $self->{WORKSHEET_NAMES} = undef; - UNIVERSAL::isa($self->{$_}, 'ARRAY') || ($self->{$_} = []) - for qw( STACK PARAM_MAP NAME_MAP ); + for (qw( STACK PARAM_MAP NAME_MAP )) + { + next if defined $self->{$_} && UNIVERSAL::isa($self->{$_}, 'ARRAY'); + $self->{$_} = []; + } $self->{$_} = 0 for keys %isAbsolute; @@ -289,19 +292,55 @@ Excel::Template::Context =head1 PURPOSE +This is a helper node that provides the global context for the nodes do their processing within. It provides attribute scoping, parameter resolution, and other very nice things. + +Documentation is provided for if you wish to subclass another node. + =head1 NODE NAME +None + =head1 INHERITANCE +None + =head1 ATTRIBUTES +None + =head1 CHILDREN +None + =head1 AFFECTS +Everything + =head1 DEPENDENCIES -=head1 USAGE +None + +=head1 METHODS + +=head2 active_format + +=head2 active_worksheet + +=head2 add_reference + +=head2 get + +=head2 get_all_references + +=head2 get_last_reference + +=head2 named_param + +=head2 new_worksheet + +=head2 param + +=head2 use_unicode =head1 AUTHOR