Data-Embed

 view release on metacpan or  search on metacpan

lib/Data/Embed.pod  view on Meta::CPAN

=head2 B<< reassemble >>

   # when %args includes details for an output channel
   reassemble(%args);

Reassemble a target container fitting new input sequence. The available
arguments are:

=over

=item sequence

the sequence of items that have to be embedded. Each item can be:

=over

=item *

a L<Data::Embed::File> (e.g. coming from what you read from some other
file)

=item *

a reference to a hash whose contents is compatible with what expected by
L<Data::Embed::Writer::add>.

=back

=item target

the target container. It can be:

=over

=item *

a I<filehandle>

=item *

a I<filename> (including C<->, that does what you mean)

=item *

a I<reference to a scalar>

=back

If the file or reference to a scalar are used, it will make sure to
avoid clobbering. In particular, the I<prefix> data (i.e. data that is
not part of the list of files) will be preserved.

=back


=head2 B<< writer >>

This is a convenience wrapper around the constructor for
L<Data::Embed::Writer>.

=head1 BUGS AND LIMITATIONS

Report bugs either through RT or GitHub (patches welcome).

Passing the same filehandle for both C<input> and C<output> in L</embed>
is not supported. This applies to C<container> too.

=head1 SEE ALSO

L<Data::Section> covers a somehow similar need but differently. In
particular, you should look at it if you want to be able to modify the
data you want to embed directly, e.g. if you are embedding some textual
templates that you want to tweak.

=head1 AUTHOR

Flavio Poletti <polettix@cpan.org>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2014-2016 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.

=cut



( run in 1.114 second using v1.01-cache-2.11-cpan-39bf76dae61 )