Cac
view release on metacpan or search on metacpan
See Cache specification
Exception: si
=item _CacPop $arg
Not implemented
Exception: yes
=cut
sub _CacPop($) {
die "_CacPop not implemented.";
}
=item $val = _CacPopDbl()
See Cache specification
Exception: yes
=item $val = _CacPopInt()
See Cache specification
Exception: yes
=item $string = _CacPopList()
Currently not implemented
Exception: yes
=cut
sub _CacPopList()
{
die "_CacPopList is currently not implemented - sorry.";
}
=item $oref = _CacPopOref()
See Cache specification
Exception: yes
=item $str = _CacPopStr()
See Cache specification
Exception: yes
=item $ptr = _CacPopPtr()
Not Implemented
Exception: yes
=cut
sub _CacPopPtr() {
die "_CacPopPtr is currently not implemented";
}
=item _CacPushClassMethod $classname, $methodname, [$flag]/
See Cache specification
Exception: /bin/true
Note: flag defaults to 0
=item _CacPushDbl $double
Cac/ObjectScript.pm view on Meta::CPAN
our $VERSION = 1.83;
use Filter::Simple ();
use Digest::MD5 "md5_hex";
use Cac::Global;
use Cac::Routine;
use Cac::Util;
# this is a political statement :)
sub michael_moore_for_president($$) {
my ($expr,$type) = @_;
my %bind;
my @bind;
my $md5 = md5_hex "$VERSION$expr"; # API may change, so we force recompile on version change
my $rtn = substr "CPERL$md5", 0, 30;
for(;;) {
last unless $expr =~ m/\G[^:]*:([a-zA-Z][a-zA-Z0-9]*)/gx;
push @bind, $1 unless $bind{$1}++;
}
Cac/Util.pm view on Meta::CPAN
Gset "rMAC", $rtn, 0, CacEval '$h';
GsetA "rMAC", $rtn, 0, \@lines;
GsetH "rMAC", $rtn, 0, { LANG => "", SIZE => $size };
Do 'COMPILE', '%RCOMPIL', $rtn, 'MAC';
die "Routine compilation failed for '$rtn'" unless defined Gget "rOBJ", $rtn;
}
=cut
sub compileMAC($@) {
my ($rtn, @lines) = @_;
my $size = length join "", @lines;
unshift @lines, scalar @lines;
Gset "rMAC", $rtn, 0, CacEval '$h';
GsetA "rMAC", $rtn, 0, \@lines;
GsetH "rMAC", $rtn, 0, { LANG => "", SIZE => $size };
Do 'COMPILE', '%RCOMPIL', $rtn, 'MAC';
die "Routine compilation failed for '$rtn'" unless defined Gget "rOBJ", $rtn;
}
( run in 1.075 second using v1.01-cache-2.11-cpan-65fba6d93b7 )