lots of updates!
Sebastian Riedel [Thu, 10 Mar 2005 19:38:06 +0000 (19:38 +0000)]
Changes
lib/Catalyst.pm
lib/Catalyst/Helper.pm
lib/Catalyst/Manual.pod
lib/Catalyst/Manual/Intro.pod

diff --git a/Changes b/Changes
index 480a2b7..6fb7d1f 100644 (file)
--- a/Changes
+++ b/Changes
@@ -2,6 +2,7 @@ This file documents the revision history for Perl extension Catalyst.
 
 4.23  Wed Mar 09 20:00:00 2005
         - no more regex actions in forward
+        - added support for test directories t/m, t/v and t/c
 
 4.22  Tue Mar 08 20:00:00 2005
         - catch errors in application class
index cdd9c53..5349cb2 100644 (file)
@@ -176,6 +176,17 @@ sub import {
     $caller->log->debug(qq/Loaded engine "$engine"/) if $caller->debug;
 }
 
+=head1 SUPPORT
+
+IRC:
+
+    Join #catalyst on irc.perl.org.
+
+Mailing-Lists:
+
+    http://lists.rawmode.org/mailman/listinfo/catalyst
+    http://lists.rawmode.org/mailman/listinfo/catalyst-dev
+    
 =head1 SEE ALSO
 
 L<Catalyst::Manual>, L<Catalyst::Test>, L<Catalyst::Request>,
index 203238f..633f7fe 100644 (file)
@@ -145,26 +145,18 @@ sub mk_file {
 
 sub next_test {
     my ( $self, $tname ) = @_;
-    my $dir = $self->{test_dir};
-    my $num = '01';
-    for my $i (<$dir/*.t>) {
-        $i =~ /(\d+)[^\/]*.t$/;
-        my $j = $1 || $num;
-        $num = $j if $j > $num;
-    }
-    $num++;
-    $num = sprintf '%02d', $num;
-    if ($tname) { $tname = "$num$tname.t" }
+    if ($tname) { $tname = "$tname.t" }
     else {
         my $name   = $self->{name};
-        my $type   = $self->{type};
         my $prefix = $name;
         $prefix =~ s/::/_/g;
         $prefix         = lc $prefix;
-        $tname          = lc( $num . $type . '_' . $prefix . '.t' );
+        $tname          = $prefix . '.t';
         $self->{prefix} = $prefix;
     }
-    return "$dir/$tname";
+    my $dir  = $self->{test_dir};
+    my $type = lc $self->{type};
+    return File::Spec->catfile( $dir, $type, $tname );
 }
 
 sub _mk_dirs {
@@ -178,6 +170,9 @@ sub _mk_dirs {
     $self->mk_dir( $self->{root} );
     $self->{t} = File::Spec->catdir( $self->{dir}, 't' );
     $self->mk_dir( $self->{t} );
+    $self->mk_dir( File::Spec->catdir( $self->{t}, 'm' ) );
+    $self->mk_dir( File::Spec->catdir( $self->{t}, 'v' ) );
+    $self->mk_dir( File::Spec->catdir( $self->{t}, 'c' ) );
     $self->{class} = File::Spec->catdir( split( /\:\:/, $self->{name} ) );
     $self->{mod} = File::Spec->catdir( $self->{lib}, $self->{class} );
     $self->mk_dir( $self->{mod} );
@@ -255,7 +250,8 @@ use ExtUtils::MakeMaker;
 WriteMakefile(
     NAME         => '$name',
     VERSION_FROM => 'lib/$class.pm',
-    PREREQ_PM    => { Catalyst => 0 }
+    PREREQ_PM    => { Catalyst => 0 },
+    test         => { TESTS => join ' ', ( glob('t/*.t'), glob('t/*/*.t') ) }
 );
 EOF
 }
index 6169268..4a868b6 100644 (file)
@@ -24,6 +24,17 @@ L<Catalyst::Manual::Troubleshooting>
 L<Catalyst::Manual::FAQ>
     Frequently Asked Questions.
 
+=head1 SUPPORT
+
+IRC:
+
+    Join #catalyst on irc.perl.org.
+
+Mailing-Lists:
+
+    http://lists.rawmode.org/mailman/listinfo/catalyst
+    http://lists.rawmode.org/mailman/listinfo/catalyst-dev
+
 =head1 AUTHOR
 
 Sebastian Riedel, C<sri@oook.de>
index 2f0eff0..15f6ee8 100644 (file)
@@ -570,6 +570,17 @@ or
 
 Have fun!
 
+=head1 SUPPORT
+
+IRC:
+
+    Join #catalyst on irc.perl.org.
+
+Mailing-Lists:
+
+    http://lists.rawmode.org/mailman/listinfo/catalyst
+    http://lists.rawmode.org/mailman/listinfo/catalyst-dev
+
 =head1 AUTHOR
 
 Sebastian Riedel, C<sri@oook.de> and David Naughton, C<naughton@umn.edu>