App-Framework-Lite
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
# It's in core of perl >= 5.9.3, and should be installed
# as one of the Pod::Simple's prereqs, which is a prereq
# of Pod::Text 3.x (see also below).
$author =~ s{ E<( (\d+) | ([A-Za-z]+) )> }
{
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
# Pod::Text < 3.0 has yet another mapping table,
# though the table name of 2.x and 1.x are different.
# (1.x is in core of Perl < 5.6, 2.x is in core of
# Perl < 5.9.3)
my $mapping = ($Pod::Text::VERSION < 2)
? \%Pod::Text::HTML_Escapes
: \%Pod::Text::ESCAPES;
$author =~ s{ E<( (\d+) | ([A-Za-z]+) )> }
{
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
$author =~ s{E<lt>}{<}g;
$author =~ s{E<gt>}{>}g;
}
$self->author($author);
} else {
lib/App/Framework/Lite.pm view on Meta::CPAN
#use re 'debugcolor' ;
foreach my $val_ref (@vals)
{
print " # Expand \"$$val_ref\" ...\n" if $this->{debug};
$$val_ref =~ s{
(?:
[\\\$]\$ # escaped dollar
\{{0,1} # optional brace
([\w\-\d]+) # find a "word" and store it in $1
\}{0,1} # optional brace
)
|
(?:
\$ # find a literal dollar sign
\{{0,1} # optional brace
([\w\-\d]+) # find a "word" and store it in $1
\}{0,1} # optional brace
)
}{
my $prefix = '' ;
my ($escaped, $var) = ($1, $2) ;
$escaped ||= '' ;
$var ||= '' ;
print " # esc=\"$escaped\", prefix=\"$prefix\", var=\"$var\"\n" if $this->{debug};
my $replace='' ;
if ($escaped)
{
$prefix = '$' ;
$replace = $escaped ;
print " ## escaped prefix=$prefix replace=$replace\n" if $this->{debug};
print " ## DONE\n" if $this->{debug};
}
else
{
## use current HASH values before vars
if (defined $hash_ref->{$var})
{
print " ## var=$var current state=${$_state_href->{$var}}\n" if $this->{debug};
if (${$_state_href->{$var}} eq 'to_expand')
{
lib/App/Framework/Lite.pm view on Meta::CPAN
print " ## var=$var can replace now=$replace\n" if $this->{debug};
if (!$replace)
{
$replace = "" ;
print " ## no replacement\n" if $this->{debug};
print " ## DONE\n" if $this->{debug};
}
}
print " ## ALL DONE $key: $escaped$var = \"$prefix$replace\"\n\n" if $this->{debug};
"$prefix$replace" ;
}egxm; ## NOTE: /m is for multiline anchors; /s is for multiline dots
}
$this->prt_data("Hash now=", $hash_ref) if $this->{debug}>=2;
# mark as expanded
${$_state_href->{$key}} = 'expanded' ;
$this->prt_data("State now=", $_state_href) if $this->{debug}>=2;
lib/App/Framework/Lite/Object.pm view on Meta::CPAN
sub quote_str
{
my $this = shift ;
my ($str) = @_ ;
##my $class = $this->class() ;
# skip on Windows machines
unless ($^O eq 'MSWin32')
{
# first escape any existing quotes
$str =~ s%\\'%'%g ;
$str =~ s%'%'\\''%g ;
$str = "'".$str."'" ;
}
return $str ;
}
( run in 0.995 second using v1.01-cache-2.11-cpan-c21f80fb71c )