- or download this
my $tmpl = Template->new();
$tmpl->process( 'user_form.tmpl',
...
{ name => 'Bruce Springsteen',
last_login => '2000-01-01 05:45:00' },
common_date_format => \&my_date_format } );
- or download this
<p>Welcome [% user.name %]. Your last login was
[% common_date_format( user.last_login ) %].</p>
- or download this
my $user = User->fetch( 'theboss' );
my $tmpl = Template->new();
$tmpl->process( 'user_form.tmpl',
{ user => $user,
common_date_format => \&my_date_format } );