#!/usr/bin/perl use strict; use Skel::Data; skimport; print templ1( {tit=>"Dragao",aut=>"Aho, Ulman and Setty"}, {tit=>"Lusiadas",aut=>"Camoes",desc=>"epopeia"}, {tit=>"Skel::Data",aut=>"jj"}, ); __DATA__ __templ1__ [% default:{desc=> sub {my %v=@_; `apropos $v{tit}` }} %] Titulo: [% tit %] author: [% aut %] isa: Book [% !templ2 %] __templ2__ Descrição do livro: [% desc %] ------ __END__ =head1 NAME ex11 - examples =head1 SYNOPSIS use of default value as a sub (that calls an external command) templ($hand1, $hand2) ==> templ($hand1) . templ($hand2) [%!templ2 %] ==> include(templ2)