NAME
Mojolicious::Plugin::AssetPack::Asset - AssetPack asset storage
VERSION
0.01
DESCRIPTION
Mojolicious::Plugin::AssetPack::Asset is storage class for assets.
This class is EXPERIMENTAL.
ATTRIBUTES
in_memory
Boolean true if this file only exists in memory, false if stored on disk.
url
Either location on disk, HTTP URL or a virtual location (in case of "in_memory").
METHODS
add_chunk
$self = $self->add_chunk($bytes);
Will store data internally, which later can be written to disk using "save".
basename
Returns the basename of "url".
slurp
$bytes = $self->slurp;
Read in the contents of the asset. Returns the data from "add_chunk" if "in_memory" is true.
save
$self = $self->->save;
"save" is used to write all the "add_chunk" data to disk.
This method does nothing if "in_memory" is true.
COPYRIGHT AND LICENSE
Copyright (C) 2014, Jan Henning Thorsen
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.
AUTHOR
Jan Henning Thorsen - jhthorsen@cpan.org