Rechercher une page de manuel
Mojo::Asset.3pm
Langue: en
Version: 2010-08-12 (fedora - 01/12/10)
Section: 3 (Bibliothèques de fonctions)
Sommaire
NAME
Mojo::Asset - Asset Base ClassSYNOPSIS
use base 'Mojo::Asset';
DESCRIPTION
Mojo::Asset is an abstract base class for assets.ATTRIBUTES
Mojo::Asset implements the following attributes.end_range
my $end = $asset->end_range; $asset = $asset->end_range(8);
Pretend file ends earlier.
start_range
my $start = $asset->start_range; $asset = $asset->start_range(0);
Pretend file starts later.
METHODS
Mojo::Asset inherits all methods from Mojo::Base and implements the following new ones.add_chunk
$asset = $asset->add_chunk('foo bar baz');
Add chunk of data to asset.
contains
my $position = $asset->contains('bar');
Check if asset contains a specific string.
get_chunk
my $chunk = $asset->get_chunk($offset);
Get chunk of data starting from a specific position.
move_to
$asset = $asset->move_to('/foo/bar/baz.txt');
Move asset data into a specific file.
size
my $size = $asset->size;
Size of asset data in bytes.
slurp
my $string = $file->slurp;
Read all asset data at once.
SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicious.org>.Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre