[htmltmpl] Param( ) Method and Default= Attribute ... ?
Brought to you by:
samtregar
From: Cory T. <ct...@on...> - 2003-05-28 22:59:37
|
Hello, In a template, I have this ... <!-- <tmpl_var name="doc" default="this is the data for this run mode"> --> In a perl script, I have this ... #----------- my $template = HTML::Template->new(filename => "$mode", die_on_bad_params => 0, #SYSTEM strict => 0, ); my $doc = $template->param( 'doc' ); #----------- From my tests, it seems as if the call to "param( 'doc' );" does not return the value of a TMPL_VAR's "default" attribute. The tests have been run on 2.6 HTML::Template, ActiveState Perl 5.6.1, HTML::Template built from source with Visual Studio. I have included by call to the HTML::Template constructor in case access to the default values via param( ) is somehow controlled by new( ) arguments. Thanks in advance. Cory Trese Lead Web Application Developer O'NEIL & ASSOCIATES, INC. 495 Byers Rd. Miamisburg, Ohio 45342-3662 Phone: (937) 865-0800 ext. 3038 Fax: (937) 865-5858 E-mail: ct...@on... |