- POTENTIAL ENHANCEMENTS
- SEE ALSO
- COPYRIGHT AND LICENSE
Data::Undump - Perl extension for securely and quickly deserializing simple Data::Dumper dumps
use Data::Undump qw(undump); my $dump= Data::Dumper->new([$simple_thing])->Terse(1)->Dump(); undump($dump);
Securely and quickly deserialize simple Data::Dumper dumps.
Note that this is an early release. Please contact the author(s) if you intend to use this software in production.
By default exports the
Undumps a Data::Dumper style data structure. Takes a plain string (magic not currently respected) containing a Data::Dumper Terse/Deepcopy style
Dumper output (ie. no
$VAR1 = at the front allowed currently) and returns either undef for a failed parse, or a scalar value of the value parsed. Also, in case of a failed parse, an error message will be available in the
Restricted to objects nested up to 100 items deep.
Support for the following isn't implemented but might be in future enhancements.
* String magic on input scalar * qr// * ref to object. Eg \['foo'] * Make it possible to parse a list instead of a scalar. * Blessed objects? * Cyclic structures? * Less/more tolerant parsing rules? * Filters? (Block things by their position in the structure?) * Conversion? (IE, we have '[1,1,1]' in the input, and we know we wont * need it so parse it as '1,1,1' instead.
Yves Orton <firstname.lastname@example.org>
with contributions by:
Steffen Mueller <email@example.com> Rafael Garcia-Suarez <firstname.lastname@example.org>
Copyright (C) 2012 by Yves Orton
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
A git repository for this distribution can be found at https://github.com/demerphq/Data-Undump.