Judy::Mem - Useful functions for interacting with memory
Copies $String into a new C string. The allocated string will be large enough to hold your perl string regardless of whether it uses multi-byte characters, or has null characters.
$String
You'll need to be careful to free this copy later when you're done with it.
Dereferences $Ptr and copies it into a new perl string. Doesn't do anything about Unicode, multibyte encoding, or null characters. In fact, if you have nulls in your data, your copied string will be truncated. Use the other function Ptr2String2 which allows you to pass in the byte length.
$Ptr
Ptr2String2
Dereferences $Ptr and copies it into a new perl string. Doesn't do anything about Unicode, multibyte encoding. See the Encode and utf8 about flipping the Perl utf8 bits.
Frees a pointer. You should be using this function on any pointer you previously allocated with String2Ptr or String2Ptr2.
Reads an integer out of memory. This is equivalent to:
(Word_t)*ptr
Writes an integer to memory. This is equivalent to to C code:
*ptr = (Word_t)val;
See Judy.
To install Judy, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Judy
CPAN shell
perl -MCPAN -e shell install Judy
For more information on module installation, please visit the detailed CPAN module installation guide.