CGI-Uploader

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

    - If an uploaded was updated and had its MIME type changed in the process,
      the old file was left on the file system. Fixed. 

    - If 'up_table_map' was used to modify the name of the extension field, 
      then transform_meta() would return empty values for the extensions. Fixed.

    [INTERNALS]
    - Migrated Makefile.PL to use Module::Install. This allows me to keep the hairy 
      Makefile.PL stuff I have, but easily add 'no_index' and 'recommends' metadata.
    - test suite clean up.
    - new required modules: Scalar::Util and HTTP::Request::Common

1.2 Thu Dec 15 22:35:39 EST 2005
    [BUG FIXES]
    - Fixed bug in store_uploads() from improper hash usage.  

    [INTERNALS]
    - Fixed some typos in Makefile.PL requirements 
    - Made test suite use SQLite by default for easier testing. 

1.1 Wed Dec 14 21:23:56 EST 2005

Makefile.PL  view on Meta::CPAN

        'SQL::Abstract'       => 0,
        'CGI'                 => 0,
        'DBI'                 => 0,
        'DBD::SQLite'         => 1.1,
        'File::Temp'          => 0.15,
        'Test::DatabaseRow'   => 0,
        'HTTP::BrowserDetect' => 0.98,
        'Scalar::Util'        => 0,

        # For testing
        'HTTP::Request::Common' => 0,

    },
);

t/basic.t  view on Meta::CPAN

# I can't run any more tests in the parent after I do this. 
# See: http://perlmonks.org/?node_id=469077
# Thanks, Cees.
Test::More->builder->no_ending(1);
use Carp::Assert;
use Data::Dumper;
use DBI;
use CGI;
use Test::DatabaseRow;

use HTTP::Request::Common;
use lib 't/lib';
use CGI::Uploader::Test; # provides setup() and read_file()
use Config;

use strict;

$| = 1;

if (! $Config{d_fork} ) {
    plan skip_all => "fork not available on this platform";
}
else {
    plan tests => 24;

}

my ($DBH,$drv) = setup();

my $req = &HTTP::Request::Common::POST(
    '/dummy_location',
    Content_Type => 'form-data',
    Content      => [
        test_file => ["t/test_file.txt"],
    ]
);

# Useful in simulating an upload. 
$ENV{REQUEST_METHOD} = 'POST';
$ENV{CONTENT_TYPE}   = 'multipart/form-data';

t/cgi-simple.t  view on Meta::CPAN

# This test is basically a copy of t/basic.t
# with CGI::Simple substituted for CGI.pm

use Test::More;
Test::More->builder->no_ending(1);
use Carp::Assert;
use Config;
use Data::Dumper;
use DBI;
use Test::DatabaseRow;
use HTTP::Request::Common;
use lib 't/lib';
use CGI::Uploader::Test; # provides setup() read_file(), etc
use strict;

$| = 1;

if (! $Config{d_fork} ) {
    plan skip_all => "fork not available on this platform";
}
else {

t/cgi-simple.t  view on Meta::CPAN

    else {
        plan skip_all => 'CGI::Simple should work, but having these tests for it work is
            pending a bug fix: http://rt.cpan.org/NoAuth/Bug.html?id=14838';
        #plan tests => 23;
    }
}

my ($DBH,$drv) = setup();


my $req = &HTTP::Request::Common::POST(
    '/dummy_location',
    Content_Type => 'form-data',
    Content      => [
        test_file => ["t/test_file.txt"],
    ]
);

# Useful in simulating an upload. 
$ENV{REQUEST_METHOD} = 'POST';
$ENV{CONTENT_TYPE}   = 'multipart/form-data';

t/meta.t  view on Meta::CPAN

use Test::More; 
Test::More->builder->no_ending(1);
use Config;
use Carp::Assert;
use lib 't/lib';
use strict;

use CGI::Uploader;
use DBI;
use CGI;
use HTTP::Request::Common;
use CGI::Uploader::Test;

$| = 1;

if (! $Config{d_fork} ) {
    plan skip_all => "fork not available on this platform";
}
else {
    plan tests => 12;

}

my ($DBH, $drv) = setup();

my $req = &HTTP::Request::Common::POST(
    '/dummy_location',
    Content_Type => 'form-data',
    Content      => [
        test_file => ["t/test_file.txt"],
    ]
);

# Useful in simulating an upload. 
$ENV{REQUEST_METHOD} = 'POST';
$ENV{CONTENT_TYPE}   = 'multipart/form-data';

t/up_table_map.t  view on Meta::CPAN

use Test::More;
Test::More->builder->no_ending(1);
use lib 'lib';
use strict;
use HTTP::Request::Common;
use lib 't/lib';
use CGI::Uploader::Test; # provides setup() and read_file()
use Config;

use CGI::Uploader;
use DBI;
use CGI;
use Test::DatabaseRow;

$| = 1;

t/up_table_map.t  view on Meta::CPAN

if (! $Config{d_fork} ) {
    plan skip_all => "fork not available on this platform";
}
else {
    plan tests => 19;
}

# skip default table create to do it ourselves later.
my ($DBH,$drv) = setup(skip_create_uploader_table => 1);

my $req = &HTTP::Request::Common::POST(
    '/dummy_location',
    Content_Type => 'form-data',
    Content      => [
        test_file => ["t/test_file.txt"],
    ]
);

# Useful in simulating an upload.
$ENV{REQUEST_METHOD} = 'POST';
$ENV{CONTENT_TYPE}   = 'multipart/form-data';



( run in 0.939 second using v1.01-cache-2.11-cpan-de7293f3b23 )