The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Tie::File::Indexed::Storable - tied array access to indexed data files: Storable-encoded references (native byte-order)

SYNOPSIS

 use Tie::File::Indexed::Storable;
 tie(my @data, 'Tie::File::Indexed::Storable', $filename, %options) or die ...
 
 ##-- add some data
 $data[0] = {foo=>'bar'}; # transparently encode/decode perl hashes
 $data[1] = [1..10];      # ... or arrays
 $data[2] = \42;          # ... or scalar-refs
 $data[3] = undef;        # ... or undef
 print $data[1];          # retrieve & print a stored value

DESCRIPTION

Tie::File::Indexed::Storable provides a Tie::File::Indexed subclass for storing arrays of perl data structures encoded using the Storable module. Data items are written in the native byte-order using Storable::store_fd().

See "SUBCLASSES" in Tie::File::Indexed for an overview of the built-in Tie::File::Indexed subclasses.

CAVEATS

General caveats

See "CAVEATS" in Tie::File::Indexed for general issues regarding the Tie::File::Indexed base class.

In-place item modification not supported

See "In-place item modification not supported" in Tie::File::Indexed::JSON for details.

Limited datatype support

Only references which can be successfully encoded and decoded by the Storable module are supported by this class. In particlar, that means that you can't store raw SCALARs or CODE refs without further ado, although you CAN store undef values, which Storable also doesn't support. The Storable module itself provides additional hooks for serialization of bless()ed object, see Storable for details.

AUTHOR

Bryan Jurish <moocow@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2015 by Bryan Jurish

This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.20.2 or, at your option, any later version of Perl 5 you may have available.