WWW::MeGa::Item - Representing a item in WWW::MeGa
use WWW::MeGa::Item; my $item = WWW::MeGa::Item->new('some/file.jpg', $config, $cache); print $item->thumbnail(1);
WWW::MeGa::Item represents a "item" in WWW::MeGa.
Passing a relative path to a arbitrary file to the new-method will return one of the following specific objects based on the mime type:
creates a new WWW::MeGa::Item::* object based on the mime type of the file specified by $relative_path.
$config is a Config::Simple object, containing, amongst other things, the root-path to build the absolute path.
$cache is a hash reference to cache the exif data
returns necessary data for rendering the template
read, return and cache the exif data for the represented file
$self-thumbnail_source> and returns a thumbnail in the requested size. If
$self-thumbnail_source> does not exist, it use a icon based on the mime type.
It should not be called directly but through the caching methode
returns the source for the thumbnail. Thats the original file that can be scaled via thumbnail_sized. Think of it as a image represenation for the file type. This method is empty and should be overwritten for images and videos to have a real thumbnail.
returns the actual thumbnail. If the resized thumb already exist, return the path to that one. If no, try to create it first by calling