Hades
view release on metacpan or search on metacpan
macro-dolos.hades view on Meta::CPAN
lib lib
tlib t
author LNATION
email email@lnation.org
version 0.27
Hades::Macro::Dolos base Hades::Macro {
abstract { Hades macro helpers for Dolos }
synopsis {
Quick summary of what the module does:
Hades->run({
eval => q|
macro {
Dolos
}
Kosmos {
psyche $dolos :t(Int) $eros :t(HashRef) $psyche :t(HashRef) {
â¬if($dolos,â¬if($dolos > 10, return $eros;);, â¬elsif($dolos > 5, â¬merge_hash_refs($eros, $psyche););,
â¬else(return $psyche;););
return undef;
}
}
|;
});
}
macro :t(ArrayRef) :d([qw/
autoload_cb
caller
clear_unless_keys
call_sub
call_sub_my
delete
die_unless_keys
else
elsif
export
for
foreach
for_keys
for_key_exists_and_return
grep
grep_map
if
map
map_grep
maybe
merge_hash_refs
require
unless
while
/])
autoload_cb $mg :t(Object) $cb :t(Str) {
return qq|
my (\$cls, \$vn) = (ref \$_[0], q{[^:'[:cntrl:]]{0,1024}});
our \$AUTOLOAD =~ /^\${cls}::(\$vn)\$/;
return ${cb}(\$1) if \$1;
|;
}
caller $mg :t(Object) $variable :t(Str) :d(q|$caller|) {
return qq|my $variable = caller();|;
}
clear_unless_keys $mg :t(Object) $variable :t(Str) $hash :t(Str) {
return qq|$variable = undef if (! ref $hash \|\| ! scalar keys \%{$hash});|;
}
call_sub $mg :t(Object) $sub :$(Str) @params {
( run in 1.652 second using v1.01-cache-2.11-cpan-5b529ec07f3 )