NAME Cache - Integration of Intersystems Cache Database into Perl SYNOPSIS use Cache qw(:lowlevel :highlevel); _CacheEval '$ZV'; print _CacheConvert(); This module and all modules in the Cache::-Domain require a perl that has Cache fully embedded. (such a binary is a dual-binary that is a Perl and a Cache binary at the same time. Usually there is a softlink (ln -s cache cperl) so you don't need to use cache --perl anymore, it works the following way: use: o cache --perl [perl options ] and you start perl with embedded cache o cperl [ perl options ] and you get perl with embedded cache o cache [ cache options ] and you get cache with embedded perl For backward compatibility with older versions of Cache-Perl o cache -perl [ perl options ] is still supported but this feature is deprecated. Use "--perl" instead of "-perl". Note: Most of this stuff is the low-level Interface, you normally don't need it, except maybe CacheEval and CacheExecute. o use Cache::ObjectScript - for embedded ObjectScript support o use Cache::Global - for high-performance global access (bulk support) o use Cache::Routine - for calling routines and functions o use Cache::Bind - for bidirectional binding of COS Variables to Perl variables o use Cache::Util - for utility functions and helpers DESCRIPTION * This module provides full access to most Cache call-in functions. * You should not use the call-in function without exactly knowing what you are doing * These function are not exported by default and prepended by a underscore (that means internal). * All functions are perlified - you pass a single string if Cache expects a counted string * You don't need to check for errors. Most functions raise exceptions on error: use eval { }; to catch them * Only "A" functions are supported, no "W". "W" is NOT Unicode anyway, Intersystems simply lies to you. User Interface for Cache Functions CacheEval $expr Evaluates a ObjectScript expression and returns its result Exception: yes Note: This function is slow because it has to preserve terminal settings CacheExecute $stmt Executes a ObjectScript command and returns nothing. Exception: yes Note: This function is slow because it has to preserve terminal settings Cache Call-In High-Level Functions The high-level functions can be imported by: use Cache ':highlevel'; _CacheAbort [ CACHE_CTRLC | CACHE_RESJOB ] See Cache specification. Exception: Yes Note: Don't use it. $ctx = _CacheContext() See Cache specification. Exception: No $value = _CacheConvert() See Cache specification. Exception: Yes Note: This function calls CacheConvert(CACHE_ASTRING, ...) $value = _CacheConvert2() This routine uses CacheType() to ask for the type of TOS and tries to get the value the fastest way possible. Exception: Yes _CacheCtrl($bitmap) See Cache specification Exception: Yes $converted = _CacheCvtIn($string, $table) See Cache specification Exception: Yes $converted = _CacheCvtOut($string, $table) See Cache specification Exception: Yes _CacheEnd() See Cache specification Exception: Yes Note: You should NEVER EVER call this! even POSIX::_exit(1); is prefered. $error = _CacheError() See Cache specification Exception: Yes (if a double fault happens) Note: No need to call this because every error is reported by croak. $errorstring = _CacheErrxlate($errornum) See Cache specification Exception: No (if the call to CacheErrxlate fails, undef is returned) _CacheEval $string See Cache specification Exception: Yes _CacheExecute $string See Cache specification Exception: Yes $prompt = _CachePrompt() See Cache specification Exception: Yes Note: Experts call this functions only by accident. :) _CacheSignal $number See Cache specification Exception: Yes Note: Think and you will find out that you don't want it in most cases. _CacheStart($flags, $timeout, $princin, $princout) See Cache specification Exception: Yes Note: Don't call it. It's already done. Say simply thanks :) $type = _CacheType() See Cache specification Exception: No (ahm, check the return value for errors) Cache Low-Level Call-In Functions The low-level functions can be imported by: use Cache ':lowlevel'; Use it only IF: * you know how to use gdb * you want to corrupt the database * you never use a condom anyway :) * you know what gmngen/checksum/mdate is made for :) _CacheCloseOref $oref See Cache specification Exception: Yes _CacheDoFun $rflags, $numargs See Cache specification Exception: Yes, please. _CacheDoRtn $rflags, $numargs See Cache specification Exception: Oui _CacheExtFun $rflags, $numargs See Cache specification Exception: Da _CacheGetProperty() See Cache specification Exception: Yes, sir. _CacheGlobalGet $numsubscipt, $die_or_empty See Cache specification Exception: yup _CacheGlobalSet $numsubscript See Cache specification Exception: yup, on weekends only. _CacheIncrementCountOref $oref See Cache specification Exception: ja _CacheInvokeClassMethod $numarg See Cache specification Exception: si _CachePop $arg Not implemented Exception: yes $val = _CachePopDbl() See Cache specification Exception: yes $val = _CachePopInt() See Cache specification Exception: yes $string = _CachePopList() Currently not implemented Exception: yes $oref = _CachePopOref() See Cache specification Exception: yes $str = _CachePopStr() See Cache specification Exception: yes $ptr = CachePopPtr() Not Implemented Exception: yes _CachePushClassMethod $classname, $methodname, [$flag]/ See Cache specification Exception: /bin/true Note: flag defaults to 0 _CachePushDbl $double See Cache specification Exception: yes $rflags = _CachePushFunc $tag, $routine; See Cache specification Exception: yes $rflags = _CachePushFuncX $tag, $offset, $env, $routine; See Cache specification Exception: yes _CachePushGlobal $global See Cache specification Exception: yes _CachePushGlobalX $global, $env See Cache specification Exception: yes _CachePushInt $i See Cache specification Exception: yes _CachePushList $string See Cache specification Exception: yes _CachePushMethod $oref, $methodname, [$flag] See Cache specification Exception: yes Note: $flag defaults to 0 _CachePushOref $oref See Cache specification Exception: yes _CachePushProperty $oref, $property See Cache specification Exception: yes _CachePushPtr $value See Cache specification Exception: yes $rflags = _CachePushRtn $tag, $routine See Cache specification Exception: yes $rflags = _CachePushRtnX $tag, $offset, $env, $routine See Cache specification Exception: yes _CachePushStr $string See Cache specification Exception: yes _CacheSetProperty() See Cache specification Exception: yes _CacheUnPop() See Cache specification Exception: yes SEE ALSO Cache::ObjectScript, Cache::Global, Cache::Routine, Cache::Util, Cache::Bind. AUTHOR Stefan Traby http://hello-penguin.com COPYRIGHT Copyright 2001,2003,2004 by KW-Computer Ges.m.b.H Graz, Austria Copyright 2001,2002,2003,2004 by Stefan Traby LICENSE This module is licenced under LGPL (GNU LESSER GENERAL PUBLIC LICENSE) see the LICENSE-file in the toplevel directory of this distribution.