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

NAME

Data::Embed::Reader - embed arbitrary data in a file - reader class

VERSION

version 0.1_02

METHODS

new

Constructor. Takes one positional parameter, that can be either a filename or a filehandle (in particular, a GLOB).

If a filename is provided, is it opened for read in :raw mode; an exception will be thrown if errors arise.

If a filehandle is provided, it is expected to be seekable and will also be binmode-d in :raw mode; again, an exception is thrown in case of errors.

files

Get the list of files embedded into the main file.

In list context, it returns a list of Data::Embed::File objects, each represeting a different embedded file.

In scalar context, it returns an anonymous array with the list above.

reset

reset the object's cached data, in particular the list of files. This might come handy in case you update the file and you want to re-read the index.

AUTHOR

Flavio Poletti <polettix@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2014 by Flavio Poletti <polettix@cpan.org>

This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.