Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
HTML::Template::CompilUserFContributed PHTML::Template::Compiled::Formatter(3)

NAME
       HTML::Template::Compiled::Formatter - HTC subclass for using a
       formatter

SYNOPSIS
	   my $formatter = {
	       'HTC::Class1' =>	{
		   fullname => sub {
		       $_[0]->first . '	' . $_[0]->last
		   },
		   first => HTC::Class1->can('first'),
		   last	=> HTC::Class1->can('last'),
	       },
	   };
	   my $htc = HTML::Template::Compiled::Formatter->new(
	       path => 't/templates',
	       filename	=> 'formatter.htc',
	       debug =>	0,
	   );
	   my $obj = bless ({ first => 'Abi', last => 'Gail'}, 'HTC::Class1');

	   $htc->param(
	       test => 23,
	       obj => $obj,
	   );
	   local $HTML::Template::Compiled::Formatter::formatter = $formatter;
	   my $out = $htc->output;

perl v5.32.1			  2016-0HTML::Template::Compiled::Formatter(3)

NAME | SYNOPSIS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=HTML::Template::Compiled::Formatter&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help