added: passthrough makefile.pl compat for Catalyst and helpers.
Marcus Ramberg [Fri, 22 Apr 2005 14:11:48 +0000 (14:11 +0000)]
Build.PL
Changes
MANIFEST
META.yml
Makefile.PL [new file with mode: 0644]
lib/Catalyst/Helper.pm

index 8444e4b..7f08e12 100644 (file)
--- a/Build.PL
+++ b/Build.PL
@@ -24,6 +24,7 @@ my $build = Module::Build->new(
         'Tree::Simple::Visitor::FindByPath' => 0,
         'URI'                               => 0,
     },
+    create_makefile_pl => 'passthrough',
     script_files => [ glob('script/*') ],
     test_files   => [
         glob('t/*.t'), glob('t/*/*.t'), glob('t/*/*/*.t'), glob('t/*/*/*/*.t')
diff --git a/Changes b/Changes
index e225640..d843152 100644 (file)
--- a/Changes
+++ b/Changes
@@ -6,6 +6,7 @@ This file documents the revision history for Perl extension Catalyst.
         - scripts are now prefixed, for being installable
         IMPORTANT: You have to regenerate the script directory,
         remove Makefile.PL and add Build.PL
+        - Added compat to install Module::Build if required.
 
 5.03  Tue Apr 19 20:35:00 2005 (Revision 462)
         - Fixed Test example (Torsten Seeman)
index 835059d..3185767 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,3 +1,4 @@
+Build.PL
 Changes
 lib/Catalyst.pm
 lib/Catalyst/Base.pm
@@ -28,6 +29,7 @@ lib/Catalyst/Request/Upload.pm
 lib/Catalyst/Response.pm
 lib/Catalyst/Test.pm
 lib/Catalyst/Utils.pm
+Makefile.PL
 MANIFEST                       This list of files
 META.yml
 README
@@ -81,4 +83,3 @@ t/lib/TestApp/View/Dump/Request.pm
 t/lib/TestApp/View/Dump/Response.pm
 t/plugin/loaded.t
 t/TODO
-Build.PL
index b6f8e0f..3f4b24c 100644 (file)
--- a/META.yml
+++ b/META.yml
@@ -1,26 +1,71 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
-name:         Catalyst
-version:      5.03
-version_from: lib/Catalyst.pm
-installdirs:  site
+---
+name: Catalyst
+version: 5.10
+author:
+  - Sebastian Riedel, C<sri@oook.de>
+abstract: The Elegant MVC Web Application Framework
+license: perl
 requires:
-    CGI::Simple:                   0
-    Class::Accessor::Fast:         0
-    Class::Data::Inheritable:      0
-    HTML::Entities:                0
-    HTTP::Daemon:                  0
-    HTTP::Headers:                 0
-    HTTP::Request:                 0
-    HTTP::Response:                0
-    LWP::UserAgent:                0
-    Module::Pluggable::Fast:       0
-    Template:                      0
-    Text::ASCIITable:              0
-    Tree::Simple:                  0
-    Tree::Simple::Visitor::FindByPath: 0
-    UNIVERSAL::require:            0
-    URI:                           0
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+  CGI::Simple: 0
+  Class::Accessor::Fast: 0
+  Class::Data::Inheritable: 0
+  HTML::Entities: 0
+  HTTP::Daemon: 0
+  HTTP::Headers: 0
+  HTTP::Request: 0
+  HTTP::Response: 0
+  LWP::UserAgent: 0
+  Module::Pluggable::Fast: 0.14
+  Path::Class: 0
+  Template: 0
+  Text::ASCIITable: 0
+  Tree::Simple: 0
+  Tree::Simple::Visitor::FindByPath: 0
+  UNIVERSAL::require: 0
+  URI: 0
+provides:
+  Catalyst:
+    file: lib/Catalyst.pm
+    version: 5.10
+  Catalyst::Base:
+    file: lib/Catalyst/Base.pm
+  Catalyst::Build:
+    file: lib/Catalyst/Build.pm
+  Catalyst::Dispatcher:
+    file: lib/Catalyst/Dispatcher.pm
+  Catalyst::Engine:
+    file: lib/Catalyst/Engine.pm
+  Catalyst::Engine::Apache:
+    file: lib/Catalyst/Engine/Apache.pm
+  Catalyst::Engine::Apache::MP13:
+    file: lib/Catalyst/Engine/Apache/MP13.pm
+  Catalyst::Engine::Apache::MP19:
+    file: lib/Catalyst/Engine/Apache/MP19.pm
+  Catalyst::Engine::Apache::MP20:
+    file: lib/Catalyst/Engine/Apache/MP20.pm
+  Catalyst::Engine::CGI:
+    file: lib/Catalyst/Engine/CGI.pm
+  Catalyst::Engine::FCGI:
+    file: lib/Catalyst/Engine/FCGI.pm
+  Catalyst::Engine::HTTP:
+    file: lib/Catalyst/Engine/HTTP.pm
+  Catalyst::Engine::HTTP::Catalyst:
+    file: lib/Catalyst/Engine/HTTP.pm
+  Catalyst::Engine::Test:
+    file: lib/Catalyst/Engine/Test.pm
+  Catalyst::Helper:
+    file: lib/Catalyst/Helper.pm
+    version: 0.01
+  Catalyst::Log:
+    file: lib/Catalyst/Log.pm
+  Catalyst::Request:
+    file: lib/Catalyst/Request.pm
+  Catalyst::Request::Upload:
+    file: lib/Catalyst/Request/Upload.pm
+  Catalyst::Response:
+    file: lib/Catalyst/Response.pm
+  Catalyst::Test:
+    file: lib/Catalyst/Test.pm
+  Catalyst::Utils:
+    file: lib/Catalyst/Utils.pm
+generated_by: Module::Build version 0.26
diff --git a/Makefile.PL b/Makefile.PL
new file mode 100644 (file)
index 0000000..51d31fd
--- /dev/null
@@ -0,0 +1,31 @@
+# Note: this file was auto-generated by Module::Build::Compat version 0.03
+    
+    unless (eval "use Module::Build::Compat 0.02; 1" ) {
+      print "This module requires Module::Build to install itself.\n";
+      
+      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";
+      }
+      
+      require Cwd;
+      require File::Spec;
+      require CPAN;
+      
+      # Save this 'cause CPAN will chdir all over the place.
+      my $cwd = Cwd::cwd();
+      my $makefile = File::Spec->rel2abs($0);
+      
+      CPAN::Shell->install('Module::Build::Compat')
+       or die " *** Cannot install without Module::Build.  Exiting ...\n";
+      
+      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');
index f040813..b341c94 100644 (file)
@@ -107,8 +107,8 @@ sub mk_component {
     }
     else {
         my $type   = shift;
-        my $name   = shift;
-        my $helper = shift;
+        my $name   = shift || "Missing name for model/view/controller";
+        my $helper = shift ;
         my @args   = @_;
         return 0 if $name =~ /[^\w\:]/;
         $type = 'M' if $type =~ /model|m/i;
@@ -453,6 +453,7 @@ my $build = Catalyst::Build->new(
     license            => 'perl',
     module_name        => '[% name %]',
     requires           => { Catalyst => '5.10' },
+    create_makefile_pl => 'passthrough',
     script_files       => [ glob('script/*') ],
     test_files         => [ glob('t/*.t'), glob('t/*/*.t') ]
 );