The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more

#-------------------------------------------------------------------------------
#
# File: embed.pm
# Version: 0.1
# Author: Jeremy Wall
# Definition: allows us to embed code in the containing template
#
#--------------------------------------------------------------------------
package util::embed;
sub run {
my ($self, $embed) = @_;
if (ref($embed) eq 'CODE') {
return &$embed();
} else {
return $embed;
}
return;
}
return 1;