NAME

Cache::Util - Various utitity functions for Cache

SYNOPSIS

use Cache::Util;

DESCRIPTION

This module contains various utility functions.

FUNCTIONS

The following functions (which are exported) exist:

compileMAC $name, @lines
Compiles Routine $name.

Actually, this function is a good example on Cache-Perl
programming, so it's included here for reference:

sub compileMAC($@) {
    my ($rtn, @lines) = @_;
    my $size = length join "", @lines;
    unshift @lines, scalar @lines;
    Gset  "rMAC", $rtn, 0, CacheEval '$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;
}

EXPORTS

none.

BUGS

Arround version 0.22 I stopped counting.

SEE ALSO

Cache, Cache::ObjectScript, Cache::Global, Cache::Routine, Cache::Bind.

AUTHOR

Stefan Traby <stefan@hello-penguin.com>
http://hello-penguin.com