User:AnomieBOT/source/AnomieBOT/API/Cache/Encrypted.pm/doc: Difference between revisions
Content deleted Content added
Updating published sources: General: * Remove pointless copyright notices with dates I never remember to update. * Add LICENSE.txt file instead. |
Updating published sources: SourceUploader: * Improve list handling for doc pages. * Add a TemplateStyles stylesheet to doc pages. * Cleanup some manpage refs. |
||
Line 1:
<templatestyles src="User:AnomieBOT/source-docs.css"/>
==NAME==
AnomieBOT::API::Cache::Encrypted - AnomieBOT API cache helper for encrypted data
Line 17 ⟶ 18:
; AnomieBOT::API::Cache::Encrypted->new( $optionString )
: Creates a new AnomieBOT::API::Cache::Encrypted object, which should be reblessed as a subclass. The option string is a semicolon-separated list of key-value pairs; if the value must contain a semicolon or backslash, escape it using a backslash.
: Recognized keys are:
:; encrypt
:: Key to be used when encrypting the data.
:
; $cache->encode_data( $key, $value )
: Encodes a Perl data value into binary. <code>$value</code> may be a scalar or anything accepted by [{{man/perldoc|3perl|Storable|url}}#MEMORY-STORE Storable::freeze()].
: Returns the binary data and flags on success, or undef on error.
; $cache->decode_data( $key, $data, $flags )
: Decodes binary data into a Perl value, the opposite of <code>$cache->encode_data()</code>.
: Returns the Perl value on success, or undef on error.
|