App::Dthumb::Data - Retrieve installed data (like lightbox images)
use App::Dthumb::Data; my $data = App::Dthumb::Data->new(); $data->set_vars( title => 'Something funky', ); print $data->get('html_start.dthumb'); open(my $fh, '>', 'close.png'); print {$fh} $data->get('close.png'); close($fh);
This manual documents App::Dthumb::Data version 0.2
Since there seems to be no nice way of installing additional data with Module::Build, this modules uses Data::Section to save all dthumb data (images, javascript, stylesheets...) in its __DATA__. It provides methods to retrieve this data and optionally replace certain variables in it with other content.
While building App::Dthumb, this module reads all files in the share directory and saves them in its __DATA__ section.
Returns a new App::Dthumb::Data object. Does not take any arguments.
Set replacement variables. For each hash key, when outputting data using the get function, dthumb will replace occurences of "<!-- $key -->" or "/* $key */" (the dollar sign is literal) with its value.
Returns an array of all saved data. That is, all files which do not end in ".dthumb".
Returns the exact content of share/$filename (undef if no such file was saved).
None.
So far, none are known. This module has proved to work fine with both binary and ASCII files.
However, since it encodes binary files with base64, you shouldn't use it with too many / too large files, otherwise you'll end up with a rather big module file.
Copyright (C) 2011 by Daniel Friesel <derf@chaosdorf.de>
0. You just DO WHAT THE FUCK YOU WANT TO.