GX::HTTP::Uploads - Container class for GX::HTTP::Upload objects
# Load the class use GX::HTTP::Uploads; # Create a new container object $uploads = GX::HTTP::Uploads->new; # Add an upload object $uploads->add( GX::HTTP::Upload->new( name => 'picture', file => '/tmp/0001.png' ) ); # Retrieve an upload object by its name attribute $upload = $uploads->get( 'picture' );
This module provides the GX::HTTP::Uploads class which extends the GX::Class::Object class.
new
Returns a new GX::HTTP::Uploads object.
$uploads = GX::HTTP::Uploads->new;
$uploads ( GX::HTTP::Uploads object )
$uploads
add
Adds the given upload object(s) to the container.
$uploads->add( @uploads );
@uploads ( GX::HTTP::Upload objects )
@uploads
GX::Exception
all
Returns all upload objects in the same order they were added.
@uploads = $uploads->all;
clear
Empties the container.
$uploads->clear;
count
Returns the number of upload objects currently in the container.
$count = $uploads->count;
$count ( integer )
$count
get
Returns all upload objects with the specified name in the order they were added.
@uploads = $uploads->get( $name );
$name ( string )
$name
In scalar context, the first of those objects is returned.
$upload = $uploads->get( $name );
$upload ( GX::HTTP::Upload object | undef )
$upload
undef
names
Returns the distinct names of the uploads.
@names = $uploads->names;
@names ( strings )
@names
remove
Removes the upload objects with the specified name(s) from the container.
$result = $uploads->remove( @names );
$result ( integer )
$result
Number of removed upload objects.
set
Adds the given upload object(s) to the container, replacing any previously added upload objects with the same name(s).
$uploads->set( @uploads );
GX::HTTP::Upload
Jörg A. Uzarek <uzarek@runlevelnull.de>
Copyright (c) 2009-2011 Jörg A. Uzarek.
This module is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License Version 3 as published by the Free Software Foundation.
To install GX, copy and paste the appropriate command in to your terminal.
cpanm
cpanm GX
CPAN shell
perl -MCPAN -e shell install GX
For more information on module installation, please visit the detailed CPAN module installation guide.