Renamed tests
Sebastian Riedel [Sat, 19 Nov 2005 06:30:46 +0000 (06:30 +0000)]
41 files changed:
Build.PL [deleted file]
lib/Catalyst/Build.pm [deleted file]
lib/Catalyst/Helper.pm
lib/Catalyst/PAR.pm [deleted file]
lib/Module/Install/Catalyst.pm [new file with mode: 0644]
t/lib/TestApp/Controller/Action/Streaming.pm
t/live_component_controller_action_auto.t
t/live_component_controller_action_begin.t
t/live_component_controller_action_default.t
t/live_component_controller_action_detach.t
t/live_component_controller_action_end.t
t/live_component_controller_action_forward.t
t/live_component_controller_action_global.t
t/live_component_controller_action_index.t
t/live_component_controller_action_inheritance.t
t/live_component_controller_action_local.t
t/live_component_controller_action_multipath.t
t/live_component_controller_action_path.t
t/live_component_controller_action_private.t
t/live_component_controller_action_regexp.t
t/live_component_controller_action_streaming.t
t/live_engine_reponse_cookies.t
t/live_engine_reponse_errors.t
t/live_engine_reponse_headers.t
t/live_engine_reponse_large.t
t/live_engine_reponse_redirect.t
t/live_engine_reponse_status.t
t/live_engine_request_body.t [moved from t/live_engine_body.t with 98% similarity]
t/live_engine_request_cookies.t [moved from t/live_engine_cookies.t with 97% similarity]
t/live_engine_request_headers.t [moved from t/live_engine_headers.t with 98% similarity]
t/live_engine_request_parameters.t [moved from t/live_engine_parameters.t with 99% similarity]
t/live_engine_request_uploads.t [moved from t/live_engine_uploads.t with 80% similarity]
t/live_engine_request_uri.t [moved from t/live_engine_uri.t with 95% similarity]
t/live_engine_setup_basics.t
t/live_engine_setup_plugins.t
t/live_plugin_loaded.t
t/optional_http-server-restart.t [moved from t/optinal_http-server-restart.t with 100% similarity]
t/optional_http-server.t
t/optional_memleak.t
t/optional_stress.t
t/optional_threads.t

diff --git a/Build.PL b/Build.PL
deleted file mode 100644 (file)
index 5082039..0000000
--- a/Build.PL
+++ /dev/null
@@ -1,91 +0,0 @@
-use strict;
-use Module::Build;
-
-my $build = Module::Build->new(
-    create_makefile_pl => 'passthrough',
-    license            => 'perl',
-    module_name        => 'Catalyst',
-    requires           => {
-        'perl'                              => '5.8.1',
-        'UNIVERSAL::require'                => "0.10",
-        'Class::Accessor::Fast'             => 0,
-        'Class::Data::Inheritable'          => 0,
-        'Class::Inspector'                  => 0,
-        'CGI::Cookie'                       => 0,
-        'File::Modified'                    => 0,
-        'HTML::Entities'                    => 0,
-        'HTTP::Body'                        => 0.5,
-        'HTTP::Headers'                     => 1.59,
-        'HTTP::Request'                     => 0,
-        'HTTP::Response'                    => 0,
-        'HTTP::Request::AsCGI'              => 0,
-        'LWP::UserAgent'                    => 0,
-        'MIME::Types'                       => 0,
-        'Module::Pluggable::Fast'           => 0.16,
-        'NEXT'                              => 0,
-        'Path::Class'                       => 0.09,
-        'Scalar::Util'                      => 0,
-        'Template'                          => 0,
-        'Text::SimpleTable'                 => 0,
-        'Test::MockObject'                  => 0,
-        'Time::HiRes'                       => 0,
-        'Tree::Simple'                      => 0,
-        'Tree::Simple::Visitor::FindByPath' => 0,
-        'URI'                               => 1.35,
-    },
-    recommends => {
-        'Catalyst::Engine::Apache' => '1.00',
-        FCGI                       => 0,
-        'FCGI::ProcManager'        => 0,
-        PAR                        => 0
-    },
-    create_makefile_pl => 'passthrough',
-    create_readme      => 1,
-    script_files       => [ glob('script/*') ],
-    test_files         => [
-        glob('t/*.t'),     glob('t/*/*.t'),
-        glob('t/*/*/*.t'), glob('t/*/*/*/*.t'),
-        glob('t/*/*/*/*/*.t')
-    ]
-);
-$build->create_build_script;
-
-print( '*' x 80, "\n" );
-my $banner =
-  (qw/andyg chansen draven fordmason mst naughton sri jester/)[ int( rand(8) ) ]
-  . " is the greatest and gabb is "
-  . ( (localtime)[2] > 12 ? "drunk" : "hung over" )
-  . " again!";
-print " $banner \n";
-print( '*' x 80, "\n" );
-
-print <<'EOF';
-
-                    ____      _        _           _
-                   / ___|__ _| |_ __ _| |_   _ ___| |_
-                  | |   / _` | __/ _` | | | | / __| __|
-                  | |__| (_| | || (_| | | |_| \__ \ |_
-                   \____\__ _|\__\__ _|_|\__  |___/\__|
-                                         |___/  carpe diem!
-
-EOF
-
-eval "use FCGI";
-if ($@) {
-    print qq/ Install "FCGI" for FastCGI support.\n/;
-}
-else {
-    eval "use FCGI::ProcManager";
-    print
-qq/ Install "FCGI::ProcManager" for multiprocess FastCGI external support.\n/
-      if ($@);
-}
-eval "use PAR ()";
-print qq/ Install "PAR" for PAR packaging support.\n/ if $@;
-
-print <<"EOF";
-
- Important:
-     The Apache engines have been moved to a separate package in Catalyst 5.5.
-     Please install Catalyst::Engine::Apache if you need Apache support.
-EOF
diff --git a/lib/Catalyst/Build.pm b/lib/Catalyst/Build.pm
deleted file mode 100644 (file)
index 7ecdba7..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-package Catalyst::Build;
-
-use strict;
-use Module::Build;
-use base 'Module::Build';
-use Path::Class;
-use File::Find 'find';
-
-our @ignore =
-  qw/Build Build.PL Changes MANIFEST META.yml Makefile.PL Makefile README
-  _build blib lib script t/;
-
-our $FAKE;
-our $ignore = '^(' . join( '|', @ignore ) . ')$';
-
-=head1 NAME
-
-Catalyst::Build - Module::Build extension for Catalyst
-
-=head1 SYNOPSIS
-
-See L<Catalyst>
-
-=head1 DESCRIPTION
-
-L<Module::Build> extension for Catalyst.
-
-=head1 METHODS
-
-=head2 ACTION_install
-
-=cut
-
-sub ACTION_install {
-    my $self = shift;
-    $self->SUPER::ACTION_install;
-    $self->ACTION_install_extras;
-}
-
-=head2 ACTION_fakeinstall
-
-=cut
-
-sub ACTION_fakeinstall {
-    my $self = shift;
-    $self->SUPER::ACTION_fakeinstall;
-    local $FAKE = 1;
-    $self->ACTION_install_extras;
-}
-
-=head2 ACTION_install_extras
-
-=cut
-
-sub ACTION_install_extras {
-    my $self    = shift;
-    my $prefix  = $self->{properties}{destdir} || undef;
-    my $sitelib = $self->install_destination('lib');
-    my @path    = defined $prefix ? ( $prefix, $sitelib ) : ($sitelib);
-    my $path    = dir( @path, split( '::', $self->{properties}{module_name} ) );
-    my @files   = $self->_find_extras;
-    print "Installing extras to $path\n";
-    for (@files) {
-        $FAKE
-          ? print "$_ -> $path (FAKE)\n"
-          : $self->copy_if_modified( $_, $path );
-    }
-}
-
-sub _find_extras {
-    my $self = shift;
-    my @all  = glob '*';
-    my @files;
-    for my $file (@all) {
-        next if $file =~ /$ignore/;
-        if ( -d $file ) {
-            find(
-                sub {
-                    return if -d;
-                    push @files, $File::Find::name;
-                },
-                $file
-            );
-        }
-        else { push @files, $file }
-    }
-    return @files;
-}
-
-=head1 AUTHOR
-
-Sebastian Riedel, C<sri@oook.de>
-
-=head1 LICENSE
-
-This library is free software, you can redistribute it and/or modify it under
-the same terms as Perl itself.
-
-=cut
-
-1;
index 6a34f7d..db43ce2 100644 (file)
@@ -78,14 +78,12 @@ sub mk_app {
     unless ( $self->{scripts} ) {
         $self->_mk_dirs;
         $self->_mk_appclass;
-        $self->_mk_build;
         $self->_mk_makefile;
         $self->_mk_readme;
         $self->_mk_changes;
         $self->_mk_apptest;
         $self->_mk_images;
         $self->_mk_favicon;
-        $self->_mk_package;
     }
     $self->_mk_cgi;
     $self->_mk_fastcgi;
@@ -339,15 +337,11 @@ sub _mk_appclass {
     $self->render_file( 'appclass', "$mod.pm" );
 }
 
-sub _mk_build {
-    my $self = shift;
-    my $dir  = $self->{dir};
-    $self->render_file( 'build', "$dir\/Build.PL" );
-}
-
 sub _mk_makefile {
     my $self = shift;
-    my $dir  = $self->{dir};
+    $self->{path} = File::Spec->catfile( 'lib', split( '::', $self->{name} ) );
+    $self->{path} .= '.pm';
+    my $dir = $self->{dir};
     $self->render_file( 'makefile', "$dir\/Makefile.PL" );
 }
 
@@ -447,14 +441,6 @@ sub _mk_favicon {
 
 }
 
-sub _mk_package {
-    my $self      = shift;
-    my $script    = $self->{script};
-    my $appprefix = $self->{appprefix};
-    $self->render_file( 'package', "$script\/$appprefix\_package.pl" );
-    chmod 0700, "$script/$appprefix\_package.pl";
-}
-
 =head1 HELPERS
 
 Helpers are classes that provide two methods.
@@ -580,52 +566,27 @@ it under the same terms as Perl itself.
 
 1;
 __makefile__
-    unless ( eval "use Module::Build::Compat 0.02; 1" ) {
-        print "This module requires Module::Build to install itself.\n";
+use inc::Module::Install;
 
-        require ExtUtils::MakeMaker;
-        my $yn =
-          ExtUtils::MakeMaker::prompt( '  Install Module::Build now from CPAN?',            'y' );
-
-        unless ( $yn =~ /^y/i ) {
-            die " *** Cannot install without Module::Build.  Exiting ...\n";
-        }
+name('[% name %]');
+abstract('Catalyst Application');
+author('[% author %]');
+version_from('[% path %]');
+license('perl');
 
-        require Cwd;
-        require File::Spec;
-        require CPAN;
+requires( Catalyst => '5.5');
 
-        # Save this 'cause CPAN will chdir all over the place.
-        my $cwd      = Cwd::cwd();
-        my $makefile = File::Spec->rel2abs($0);
+install_script;
+tests( glob('t/*.t'), glob('t/*/*.t') );
 
-        CPAN::Shell->install('Module::Build::Compat')
-          or die " *** Cannot install without Module::Build.  Exiting ...\n";
+catalyst_files();
 
-        chdir $cwd or die "Cannot chdir() back to $cwd: $!";
-    }
-    eval "use Module::Build::Compat 0.02; 1" or die $@;
-    use lib '_build/lib';
-    Module::Build::Compat->run_build_pl( args => \@ARGV );
-    require Module::Build;
-    Module::Build::Compat->write_makefile( build_class => 'Module::Build' );
-__build__
-use strict;
-use Catalyst::Build;
-
-my $build = Catalyst::Build->new(
-    license            => 'perl',
-    module_name        => '[% name %]',
-    requires           => { Catalyst => '5.49' },
-    create_makefile_pl => 'passthrough',
-    script_files       => [ glob('script/*') ],
-    test_files         => [ glob('t/*.t'), glob('t/*/*.t') ]
-);
-$build->create_build_script;
+&WriteAll;
 __readme__
 Run script/[% appprefix %]_server.pl to test the application.
 __changes__
 This file documents the revision history for Perl extension [% name %].
+
 0.01  [% time %]
         - initial revision, generated by Catalyst
 __apptest__
@@ -995,86 +956,6 @@ This library is free software, you can redistribute it and/or modify
 it under the same terms as Perl itself.
 
 =cut
-__package__
-[% startperl %]
-
-use strict;
-use Getopt::Long;
-use Pod::Usage;
-use Catalyst::PAR;
-
-my $core      = 0;
-my $classes   = '';
-my $engine    = 'CGI';
-my $help      = 0;
-my $multiarch = 0;
-my $output    = '[% appprefix %].par';
-
-GetOptions(
-    'classes=s' => \$classes,
-    'core'      => \$core,
-    'engine=s'  => \$engine,
-    'help|?'    => \$help,
-    'multiarch' => \$multiarch,
-    'output=s'  => \$output
-);
-
-pod2usage(1) if $help;
-
-Catalyst::PAR->new->package( {
-    classes   => $classes,
-    core      => $core,
-    engine    => $engine,
-    multiarch => $multiarch,
-    output    => $output,
-    class     => '[% name %]'
-} );
-
-1;
-
-=head1 NAME
-
-[% appprefix %]_package.pl - Package Catalyst Applications
-
-=head1 SYNOPSIS
-
-[% appprefix %]_package.pl
-
- Options:
-   -classes      comma separated list of additional classes to
-                 include in package
-   -core         also include modules bundled with Perl (defaults to false)
-   -engine       engine to use for dependency detection (defaults to CGI)
-   -help         display this help and exits
-   -multiarch    enable multiarch support (defaults to false)
-   -output       name for the par archive (defaults to [% appprefix %].par)
-
- Examples:
-   [% appprefix %]_package.pl -engine FastCGI
-   [% appprefix %]_package.pl -o foo_linux_i386_apache2.par -engine Apache2
-   [% appprefix %]_package.pl -classes Test::More,Foo::Bar -o foo.par
-
- See also:
-   perldoc Catalyst::Manual
-   perldoc Catalyst::Manual::Intro
-   perldoc pp
-
-=head1 DESCRIPTION
-
-Package Catalyst Applications with L<PAR>.
-
-=head1 AUTHOR
-
-Sebastian Riedel, C<sri@oook.de>
-
-=head1 COPYRIGHT
-
-Copyright 2004 Sebastian Riedel. All rights reserved.
-
-This library is free software, you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
 __compclass__
 package [% class %];
 
diff --git a/lib/Catalyst/PAR.pm b/lib/Catalyst/PAR.pm
deleted file mode 100644 (file)
index d74ed9c..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-package Catalyst::PAR;
-
-use strict;
-use base 'Class::Accessor::Fast';
-use FindBin;
-use IO::File;
-use File::Spec;
-use File::Find;
-require Catalyst;
-
-=head1 NAME
-
-Catalyst::PAR - Package Catalyst Applications
-
-=head1 SYNOPSIS
-
-See L<Catalyst>
-
-=head1 DESCRIPTION
-
-Package Catalyst Applications.
-
-=head1 METHODS
-
-=head2 $self->package(\%options)
-
-=cut
-
-sub package {
-    my ( $self, $options ) = @_;
-
-    my $par    = $options->{output} || 'application.par';
-    my $engine = $options->{engine} || 'CGI';
-
-    # Check for PAR
-    eval "use PAR ()";
-    die "Please install PAR" if $@;
-    eval "use PAR::Packer ()";
-    die "Please install PAR::Packer" if $@;
-    eval "use App::Packer::PAR ()";
-    die "Please install App::Packer::PAR" if $@;
-    eval "use Module::ScanDeps ()";
-    die "Please install Module::ScanDeps" if $@;
-
-    chdir File::Spec->catdir( $FindBin::Bin, '..' );
-
-    # Find additional files
-    my @files;
-    finddepth(
-        sub {
-            my $name = $File::Find::name;
-            return if $name =~ /^\W*lib/;
-            return if $name =~ /^\W*blib/;
-            return if $name =~ /^\W*_build/;
-            return if $name =~ /\.par$/;
-            return if $name !~ /\w+/;
-            push @files, $name;
-        },
-        '.'
-    );
-
-    my $par_test = File::Spec->catfile( $FindBin::Bin, '..', 'par_test.pl' );
-    unlink $par_test;
-
-    my $classes = '';
-    for my $req ( split ',', $options->{classes} ) {
-        $classes .= "require $req;\n";
-    }
-    my $version  = $Catalyst::VERSION;
-    my $class    = $options->{class};
-    my $tmp_file = IO::File->new("> $par_test");
-    print $tmp_file <<"EOF";
-die "$class on Catalyst $version\n" if \$0 !~ /par_test.pl\.\\w+\$/;
-BEGIN { \$ENV{CATALYST_ENGINE} = '$engine' };
-use lib 'lib';
-require $class;
-import $class;
-require Catalyst::Helper;
-require Catalyst::PAR;
-require Catalyst::Build;
-require Catalyst::Test;
-require Catalyst::Engine::HTTP;
-require Catalyst::Engine::CGI;
-require Catalyst::Controller;
-require Catalyst::Model;
-require Catalyst::View;
-$classes
-EOF
-    $tmp_file->close;
-
-    # Create package
-    local $SIG{__WARN__} = sub { };
-    open my $olderr, '>&STDERR';
-    open STDERR, '>', File::Spec->devnull;
-    my %opt = (
-        'x' => 1,
-        'n' => 0,
-        'o' => $par,
-        'a' => [@files],
-        'p' => 1,
-        'B' => $options->{core},
-        'm' => $options->{multiarch}
-    );
-    App::Packer::PAR->new(
-        frontend  => 'Module::ScanDeps',
-        backend   => 'PAR::Packer',
-        frontopts => \%opt,
-        backopts  => \%opt,
-        args      => ['par_test.pl'],
-    )->go;
-    open STDERR, '>&', $olderr;
-
-    unlink $par_test;
-}
-
-=head1 AUTHOR
-
-Sebastian Riedel, C<sri@oook.de>
-
-=head1 LICENSE
-
-This library is free software, you can redistribute it and/or modify it under
-the same terms as Perl itself.
-
-=cut
-
-1;
diff --git a/lib/Module/Install/Catalyst.pm b/lib/Module/Install/Catalyst.pm
new file mode 100644 (file)
index 0000000..416dd37
--- /dev/null
@@ -0,0 +1,188 @@
+package Module::Install::Catalyst;
+
+use strict;
+use base 'Module::Install::Base';
+use File::Find;
+use FindBin;
+use File::Copy::Recursive 'rcopy';
+use File::Spec ();
+
+our @IGNORE =
+  qw/Build Build.PL Changes MANIFEST META.yml Makefile.PL Makefile README
+  _build blib lib script t inc/;
+our $ENGINE    = 'CGI';
+our $CORE      = 0;
+our $MULTIARCH = 0;
+
+=head1 NAME
+
+Module::Install::Catalyst - Module::Install extension for Catalyst
+
+=head1 SYNOPSIS
+
+See L<Catalyst>
+
+=head1 DESCRIPTION
+
+L<Module::Install> extension for Catalyst.
+
+=head1 METHODS
+
+=head2 catalyst_files
+
+=cut
+
+sub catalyst_files {
+    my $self = shift;
+
+    chdir $FindBin::Bin;
+
+    my @files;
+    opendir CATDIR, '.';
+  CATFILES: for my $name ( readdir CATDIR ) {
+        for my $ignore (@IGNORE) {
+            next CATFILES if $name =~ /^$ignore$/;
+            next CATFILES if $name !~ /\w/;
+        }
+        push @files, $name;
+    }
+    closedir CATDIR;
+    my @path = split '::', $self->name;
+    for my $orig (@files) {
+        my $path = File::Spec->catdir( 'blib', 'lib', @path, $orig );
+        rcopy( $orig, $path );
+    }
+}
+
+=head2 catalyst_ignore_all(\@ignore)
+
+=cut
+
+sub catalyst_ignore_all {
+    my ( $self, $ignore ) = @_;
+    @IGNORE = @$ignore;
+}
+
+=head2 catalyst_ignore(\@ignore)
+
+=cut
+
+sub catalyst_ignore {
+    my ( $self, @ignore ) = @_;
+    push @IGNORE, @ignore;
+}
+
+=head2 catalyst_par($name)
+
+=cut
+
+sub catalyst_par {
+    my ( $self, $par ) = @_;
+
+    $par ||= 'application.par';
+    my $engine = $ENGINE || 'CGI';
+
+    # Check for PAR
+    eval "use PAR ()";
+    die "Please install PAR" if $@;
+    eval "use PAR::Packer ()";
+    die "Please install PAR::Packer" if $@;
+    eval "use App::Packer::PAR ()";
+    die "Please install App::Packer::PAR" if $@;
+    eval "use Module::ScanDeps ()";
+    die "Please install Module::ScanDeps" if $@;
+
+    my $root = $FindBin::Bin;
+    chdir File::Spec->catdir( $root, 'blib' );
+
+    my $par_pl = 'par.pl';
+    unlink $par_pl;
+
+    my $version = $Catalyst::VERSION;
+    my $class   = $self->name;
+
+    my $tmp_file = IO::File->new("> $par_pl");
+    print $tmp_file <<"EOF";
+die "$class on Catalyst $version\n" if \$0 !~ /par.pl\.\\w+\$/;
+BEGIN { \$ENV{CATALYST_ENGINE} = '$engine' };
+use lib 'lib';
+require $class;
+import $class;
+require Catalyst::Helper;
+require Catalyst::PAR;
+require Catalyst::Build;
+require Catalyst::Test;
+require Catalyst::Engine::HTTP;
+require Catalyst::Engine::CGI;
+require Catalyst::Controller;
+require Catalyst::Model;
+require Catalyst::View;
+EOF
+    $tmp_file->close;
+
+    # Create package
+    local $SIG{__WARN__} = sub { };
+    open my $olderr, '>&STDERR';
+    open STDERR, '>', File::Spec->devnull;
+    my %opt = (
+        'x' => 1,
+        'n' => 0,
+        'o' => $par,
+        'a' => [ grep( !/par.pl/, glob '.' ) ],
+        'p' => 1,
+        'B' => $CORE,
+        'm' => $MULTIARCH
+    );
+    App::Packer::PAR->new(
+        frontend  => 'Module::ScanDeps',
+        backend   => 'PAR::Packer',
+        frontopts => \%opt,
+        backopts  => \%opt,
+        args      => ['par.pl'],
+    )->go;
+    open STDERR, '>&', $olderr;
+
+    unlink $par_pl;
+    chdir $root;
+    rmove File::Spec->catfile( 'blib', $par ), $par;
+}
+
+=head2 catalyst_par_core($core)
+
+=cut
+
+sub catalyst_par_core {
+    my ( $self, $core ) = @_;
+    $CORE = $core;
+}
+
+=head2 catalyst_par_engine($engine)
+
+=cut
+
+sub catalyst_par_engine {
+    my ( $self, $engine ) = @_;
+    $ENGINE = $engine;
+}
+
+=head2 catalyst_par_multiarch($multiarch)
+
+=cut
+
+sub catalyst_par_multiarch {
+    my ( $self, $multiarch ) = @_;
+    $MULTIARCH = $multiarch;
+}
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify it under
+the same terms as Perl itself.
+
+=cut
+
+1;
index 775eaba..ef475e4 100644 (file)
@@ -17,7 +17,7 @@ EOF
 sub body : Local {
     my ( $self, $c ) = @_;
     
-    my $file = "$FindBin::Bin/../../../../01use.t";
+    my $file = "$FindBin::Bin/01use.t";
     my $fh = IO::File->new( $file, 'r' );
     if ( defined $fh ) {
         $c->res->body( $fh );
index f99d4ad..9c9e83b 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../../lib";
+use lib "$FindBin::Bin/lib";
 
 our $iters;
 
index ab65643..6e97a67 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../../lib";
+use lib "$FindBin::Bin/lib";
 
 our $iters;
 
index 2e1d68b..1a2e545 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../../lib";
+use lib "$FindBin::Bin/lib";
 
 our $iters;
 
index adc5c8e..42a9fe0 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;\r
 \r
 use FindBin;\r
-use lib "$FindBin::Bin/../../../lib";\r
+use lib "$FindBin::Bin/lib";\r
 \r
 our $iters;\r
 \r
index 8462170..161caa0 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../../lib";
+use lib "$FindBin::Bin/lib";
 
 our $iters;
 
index db1c8ea..58d0ed4 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../../lib";
+use lib "$FindBin::Bin/lib";
 
 our $iters;
 
index 13287a6..948ed9f 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../../lib";
+use lib "$FindBin::Bin/lib";
 
 our $iters;
 
index cd4f9b0..697e61f 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../../lib";
+use lib "$FindBin::Bin/lib";
 
 our $iters;
 
index f13b0e6..3c302d2 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../../lib";
+use lib "$FindBin::Bin/lib";
 
 our $iters;
 
index 1d85bee..6a5eefb 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../../lib";
+use lib "$FindBin::Bin/lib";
 
 our $iters;
 
index faa043b..1d38cc6 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../../lib";
+use lib "$FindBin::Bin/lib";
 
 my $content = q/foo
 bar
index 24aeffe..52cd73a 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../../lib";
+use lib "$FindBin::Bin/lib";
 
 our $iters;
 
index 6ca0580..c3858df 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../../lib";
+use lib "$FindBin::Bin/lib";
 
 our $iters;
 
index f67d0f9..49f7460 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../../lib";
+use lib "$FindBin::Bin/lib";
 
 our $iters;
 
index c7e1c79..3adf4b4 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../../lib";
+use lib "$FindBin::Bin/lib";
 
 our $iters;
 
@@ -43,7 +43,7 @@ EOF
             skip "Using remote server", 4;
         }
 
-        my $file = "$FindBin::Bin/../../../../01use.t";
+        my $file = "$FindBin::Bin/01use.t";
         my $fh = IO::File->new( $file, 'r' );
         my $buffer;
         if ( defined $fh ) {
index 0ed7e91..e87bb1d 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../lib";
+use lib "$FindBin::Bin/lib";
 
 use Test::More tests => 10;
 use Catalyst::Test 'TestApp';
index 7a31ee9..7f7c366 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../lib";
+use lib "$FindBin::Bin/lib";
 
 use Test::More tests => 18;
 use Catalyst::Test 'TestApp';
index fa22e73..1b374e4 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../lib";
+use lib "$FindBin::Bin/lib";
 
 use Test::More tests => 18;
 use Catalyst::Test 'TestApp';
index 17a7cbe..0d24443 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;\r
 \r
 use FindBin;\r
-use lib "$FindBin::Bin/../../lib";\r
+use lib "$FindBin::Bin/lib";\r
 \r
 use Test::More tests => 6;\r
 use Catalyst::Test 'TestApp';\r
index 6bc7089..3295779 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../lib";
+use lib "$FindBin::Bin/lib";
 
 use Test::More tests => 20;
 use Catalyst::Test 'TestApp';
index 268e13a..51f6373 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../lib";
+use lib "$FindBin::Bin/lib";
 
 use Test::More tests => 30;
 use Catalyst::Test 'TestApp';
similarity index 98%
rename from t/live_engine_body.t
rename to t/live_engine_request_body.t
index d2551f1..06198f0 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../lib";
+use lib "$FindBin::Bin/lib";
 
 use Test::More tests => 18;
 use Catalyst::Test 'TestApp';
similarity index 97%
rename from t/live_engine_cookies.t
rename to t/live_engine_request_cookies.t
index 01faaac..5677b4e 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../lib";
+use lib "$FindBin::Bin/lib";
 
 use Test::More tests => 13;
 use Catalyst::Test 'TestApp';
similarity index 98%
rename from t/live_engine_headers.t
rename to t/live_engine_request_headers.t
index 86fe405..325e965 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../lib";
+use lib "$FindBin::Bin/lib";
 
 use Test::More tests => 16;
 use Catalyst::Test 'TestApp';
similarity index 99%
rename from t/live_engine_parameters.t
rename to t/live_engine_request_parameters.t
index f399b78..b0c8867 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../lib";
+use lib "$FindBin::Bin/lib";
 
 use Test::More tests => 28;
 use Catalyst::Test 'TestApp';
similarity index 80%
rename from t/live_engine_uploads.t
rename to t/live_engine_request_uploads.t
index 7b0f55f..48a215d 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../lib";
+use lib "$FindBin::Bin/lib";
 
 use Test::More tests => 52;
 use Catalyst::Test 'TestApp';
@@ -22,9 +22,12 @@ use HTTP::Request::Common;
         'http://localhost/dump/request/',
         'Content-Type' => 'form-data',
         'Content'      => [
-            'cookies.t' => ["$FindBin::Bin/cookies.t"],
-            'headers.t' => ["$FindBin::Bin/headers.t"],
-            'uploads.t' => ["$FindBin::Bin/uploads.t"],
+            'live_engine_request_cookies.t' =>
+              ["$FindBin::Bin/live_engine_request_cookies.t"],
+            'live_engine_request_headers.t' =>
+              ["$FindBin::Bin/live_engine_request_headers.t"],
+            'live_engine_request_uploads.t' =>
+              ["$FindBin::Bin/live_engine_request_uploads.t"],
         ]
     );
 
@@ -63,11 +66,12 @@ use HTTP::Request::Common;
 
         is( $upload->type, $part->content_type, 'Upload Content-Type' );
         is( $upload->size, length( $part->content ), 'Upload Content-Length' );
-        
+
         # make sure upload is accessible via legacy params->{$file}
-        is( $creq->{parameters}->{ $upload->filename }, $upload->filename, 'legacy param method ok' ); 
-        
-        ok( ! -e $upload->tempname, 'Upload temp file was deleted' );
+        is( $creq->{parameters}->{ $upload->filename },
+            $upload->filename, 'legacy param method ok' );
+
+        ok( !-e $upload->tempname, 'Upload temp file was deleted' );
     }
 }
 
@@ -78,9 +82,9 @@ use HTTP::Request::Common;
         'http://localhost/dump/request/',
         'Content-Type' => 'multipart/form-data',
         'Content'      => [
-            'testfile' => ["$FindBin::Bin/cookies.t"],
-            'testfile' => ["$FindBin::Bin/headers.t"],
-            'testfile' => ["$FindBin::Bin/uploads.t"],
+            'testfile' => ["$FindBin::Bin/live_engine_request_cookies.t"],
+            'testfile' => ["$FindBin::Bin/live_engine_request_headers.t"],
+            'testfile' => ["$FindBin::Bin/live_engine_request_uploads.t"],
         ]
     );
 
@@ -122,8 +126,8 @@ use HTTP::Request::Common;
         is( $upload->type, $part->content_type, 'Upload Content-Type' );
         is( $upload->filename, $parameters{filename}, 'Upload filename' );
         is( $upload->size, length( $part->content ), 'Upload Content-Length' );
-        
-        ok( ! -e $upload->tempname, 'Upload temp file was deleted' );
+
+        ok( !-e $upload->tempname, 'Upload temp file was deleted' );
     }
 }
 
@@ -133,7 +137,8 @@ use HTTP::Request::Common;
     my $request = POST(
         'http://localhost/engine/request/uploads/slurp',
         'Content-Type' => 'multipart/form-data',
-        'Content'      => [ 'slurp' => ["$FindBin::Bin/uploads.t"], ]
+        'Content'      =>
+          [ 'slurp' => ["$FindBin::Bin/live_engine_request_uploads.t"], ]
     );
 
     ok( my $response = request($request), 'Request' );
similarity index 95%
rename from t/live_engine_uri.t
rename to t/live_engine_request_uri.t
index b0a2f0a..5af97f9 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;\r
 \r
 use FindBin;\r
-use lib "$FindBin::Bin/../../lib";\r
+use lib "$FindBin::Bin/lib";\r
 \r
 use Test::More tests => 23;\r
 use Catalyst::Test 'TestApp';\r
index 0bf2c9c..7d3d2d3 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../lib";
+use lib "$FindBin::Bin/lib";
 
 use Test::More tests => 1;
 use Catalyst::Test 'TestApp';
index acf3092..d280551 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../../lib";
+use lib "$FindBin::Bin/lib";
 
 use Test::More tests => 2;
 use Catalyst::Test 'TestApp';
index 59c8823..57a1646 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../lib";
+use lib "$FindBin::Bin/lib";
 
 use Test::More tests => 5;
 use Catalyst::Test 'TestApp';
index a518df0..d03a107 100644 (file)
@@ -14,14 +14,14 @@ plan skip_all => 'File::Copy::Recursive required' if $@;
 plan tests => 1;
 
 # clean up
-rmtree "$FindBin::Bin/../../t/tmp" if -d "$FindBin::Bin/../../t/tmp";
+rmtree "$FindBin::Bin/../t/tmp" if -d "$FindBin::Bin/../t/tmp";
 
 # create a TestApp and copy the test libs into it
-mkdir "$FindBin::Bin/../../t/tmp";
-chdir "$FindBin::Bin/../../t/tmp";
-system "perl -I$FindBin::Bin/../../lib $FindBin::Bin/../../script/catalyst.pl TestApp";
+mkdir "$FindBin::Bin/../t/tmp";
+chdir "$FindBin::Bin/../t/tmp";
+system "perl -I$FindBin::Bin/../lib $FindBin::Bin/../script/catalyst.pl TestApp";
 chdir "$FindBin::Bin/../..";
-File::Copy::Recursive::dircopy( 't/live/lib', 't/tmp/TestApp/lib' );
+File::Copy::Recursive::dircopy( 't/lib', 't/tmp/TestApp/lib' );
 
 # remove TestApp's tests
 rmtree 't/tmp/TestApp/t';
@@ -29,7 +29,7 @@ rmtree 't/tmp/TestApp/t';
 # spawn the standalone HTTP server
 my $port = 30000 + int rand(1 + 10000);
 my $pid = open my $server, 
-    "perl -I$FindBin::Bin/../../lib $FindBin::Bin/../../t/tmp/TestApp/script/testapp_server.pl -port $port 2>&1 |"
+    "perl -I$FindBin::Bin/../lib $FindBin::Bin/../t/tmp/TestApp/script/testapp_server.pl -port $port 2>&1 |"
     or die "Unable to spawn standalone HTTP server: $!";
 
 # wait for it to start
@@ -40,14 +40,14 @@ while ( check_port( 'localhost', $port ) != 1 ) {
 
 # run the testsuite against the HTTP server
 $ENV{CATALYST_SERVER} = "http://localhost:$port";
-system( 'prove -r -Ilib/ t/live/' );
+system( 'prove -r -Ilib/ t/live_*' );
 
 # shut it down
 kill 'INT', $pid;
 close $server;
 
 # clean up
-rmtree "$FindBin::Bin/../../t/tmp" if -d "$FindBin::Bin/../../t/tmp";
+rmtree "$FindBin::Bin/../t/tmp" if -d "$FindBin::Bin/../t/tmp";
 
 ok( 'done' );
 
index 3dcfb06..bc5a5d4 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/../live/lib";
+use lib "$FindBin::Bin/lib";
 
 use Test::More;
 use Catalyst::Test 'TestApp';
index d9fdf56..076c4f9 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;\r
 \r
 use FindBin;\r
-use lib "$FindBin::Bin/../live/lib";\r
+use lib "$FindBin::Bin/lib";\r
 \r
 use Test::More;\r
 use Catalyst::Test 'TestApp';\r
index 82c748a..50a6ecd 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;\r
 \r
 use FindBin;\r
-use lib "$FindBin::Bin/../live/lib";\r
+use lib "$FindBin::Bin/lib";\r
 \r
 use Test::More;\r
 use Catalyst::Test 'TestApp';\r