CodeGen-Cpppp
view release on metacpan or search on metacpan
lib/CodeGen/Cpppp/Template.pm view on Meta::CPAN
146147148149150151152153154155156157158159160161162163164165166
'my sub section { unshift @_, $self; goto $self->can("current_output_section") }'
,
'my sub template { unshift @_, $self->context; goto $self->context->can("new_template") }'
,
'my $trim_comma= CodeGen::Cpppp::AntiCharacter->new(qr/,/, qr/\s*/);'
,
'my $trim_ws= CodeGen::Cpppp::AntiCharacter->new(qr/\s*/);'
,
);
}
sub
_gen_BUILD_method(
$class
,
$cpppp_ver
,
$perl
,
$src_filename
,
$src_lineno
) {
return
"sub ${class}::BUILD(\$self, \$constructor_parameters=undef) {"
,
" Scalar::Util::weaken(\$self);"
,
# Inject all the lexical functions that need to be in scope
$class
->_gen_perl_scope_functions(
$cpppp_ver
),
qq{# line $src_lineno "$src_filename"}
,
$perl
,
"}"
,
}
sub
_build_BUILD_method(
$class
,
$version
,
$perl
,
$src_filename
,
$src_lineno
) {
{
no
strict
'refs'
;
lib/CodeGen/Cpppp/Template.pm view on Meta::CPAN
224225226227228229230231232233234235236237238239240241242243244
autocomma
=> 1,
autostatementline
=> 1,
(
map
+(
$_
=>
$parse
->{
$_
}||0),
qw(
autoindent autocolumn convert_linecomment_to_c89
)
),
indent
=>
$parse
->{indent},
output
=> CodeGen::Cpppp::Output->new,
current_output_section
=>
'private'
,
%attrs
,
},
$class
;
Scalar::Util::weaken(
$self
->{context})
if
$self
->{context};
$self
->BUILD(\
%attrs
);
$self
->flush;
}
sub
coerce_parameters(
$class
,
$params
) {
my
%ret
;
my
$parse
=
$class
->_parse_data;
for
my
$k
(
keys
$parse
->{template_parameter}->%*) {
( run in 0.350 second using v1.01-cache-2.11-cpan-d6f9594c0a5 )