[Catalyst-commits] r12037 - in Catalyst-Devel/1.00/branches/helper_refactor: . lib/Catalyst lib/Module/Install

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Thu Nov 26 22:52:47 GMT 2009


Author: t0m
Date: 2009-11-26 22:52:46 +0000 (Thu, 26 Nov 2009)
New Revision: 12037

Modified:
   Catalyst-Devel/1.00/branches/helper_refactor/
   Catalyst-Devel/1.00/branches/helper_refactor/Changes
   Catalyst-Devel/1.00/branches/helper_refactor/Makefile.PL
   Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Devel.pm
   Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Helper.pm
   Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Restarter.pm
   Catalyst-Devel/1.00/branches/helper_refactor/lib/Module/Install/Catalyst.pm
Log:
 r10268 at t0mlaptop (orig r10267):  autarch | 2009-05-24 16:56:38 +0100
 Doh, accidentally left in use threads & Thread::Cancel
 
 r10269 at t0mlaptop (orig r10268):  autarch | 2009-05-24 16:57:46 +0100
 Add changes for 1.17
 
 r10270 at t0mlaptop (orig r10269):  rafl | 2009-05-24 17:19:34 +0100
 Version 1.17.
 r10273 at t0mlaptop (orig r10272):  autarch | 2009-05-24 19:09:15 +0100
 Add an 's'
 
 r10342 at t0mlaptop (orig r10341):  t0m | 2009-05-28 11:35:08 +0100
 Bump required versions of Module::Install in Makefile.PL
 r10377 at t0mlaptop (orig r10376):  autarch | 2009-05-29 23:28:39 +0100
 We need to capture @ARGV in the restarter, for the benefit of Win32
 only, so that it can re-execute itself with the right
 options. Getopt::Long eats @ARGV before we have a chance to get to it.
 r10378 at t0mlaptop (orig r10377):  autarch | 2009-05-29 23:29:29 +0100
 Changes for my win32 fix
 
 r10409 at t0mlaptop (orig r10408):  autarch | 2009-06-01 20:42:28 +0100
 Wait on the child process before starting a new child - hopefully will
 fix intermittent problems arcanez reported where the restarter cannot
 start a new child because the port is not available.
 
 r10410 at t0mlaptop (orig r10409):  autarch | 2009-06-01 20:43:39 +0100
 Doc changes for forking restarter
 
 r10491 at t0mlaptop (orig r10490):  kmx | 2009-06-09 20:04:59 +0100
 C::Devel - handling some "Use of uninit. value" warnings in Module::Install::Catalyst
 r10496 at t0mlaptop (orig r10495):  rafl | 2009-06-10 18:03:17 +0100
 Version 1.18.
 r10550 at t0mlaptop (orig r10549):  t0m | 2009-06-16 09:36:04 +0100
 Merge gsoc branch down. Specifically merged some revisions, but may have missed some - need to specifically check a TestApp generated before and after this branch to ensure nothing 'got lost' - note I have note done this yet as it's time => work
 r10557 at t0mlaptop (orig r10556):  t0m | 2009-06-16 20:54:16 +0100
 Lets compile. That would be novel. merge fail
 r10708 at t0mlaptop (orig r10707):  rafl | 2009-06-28 18:53:11 +0100
 Always use unix paths in generated Makefile.PLs.
 r10711 at t0mlaptop (orig r10710):  dhoss | 2009-06-28 22:37:27 +0100
 removed crap
 
 r10712 at t0mlaptop (orig r10711):  t0m | 2009-06-28 22:42:08 +0100
 Remove warnings
 r10713 at t0mlaptop (orig r10712):  t0m | 2009-06-28 22:42:57 +0100
 Remove blank file, add more ignore props
 r10714 at t0mlaptop (orig r10713):  t0m | 2009-06-28 22:54:48 +0100
 Un-merge r10556:10548 leaving gsoc code in branch as whilst all the things have been fixed in the branch we need to release this first step, I can't be bothered cherry picking them, so I'm just going to give up with Catalyst::Script::* is baked
 r10717 at t0mlaptop (orig r10716):  rafl | 2009-06-28 23:41:32 +0100
 Version 1.19.
 r10768 at t0mlaptop (orig r10767):  t0m | 2009-07-01 15:50:39 +0100
 Need File::ChangeNotify => 0.06
 r10999 at t0mlaptop (orig r10998):  jester | 2009-07-29 20:58:23 +0100
 POD tweak (Oleg Kostyuk)
 r11120 at t0mlaptop (orig r11119):  rafl | 2009-08-11 21:34:22 +0100
 Bump the File::ChangeNotify prereq some more.
 r11121 at t0mlaptop (orig r11120):  rafl | 2009-08-11 21:34:29 +0100
 Version 1.20.
 r11250 at t0mlaptop (orig r11249):  frew | 2009-08-26 19:33:32 +0100
 Fix -I issues for win32
 r11251 at t0mlaptop (orig r11250):  frew | 2009-08-26 19:49:25 +0100
 Fix -I issues for win32 (Changelog)
 r11265 at t0mlaptop (orig r11264):  rafl | 2009-08-28 14:00:32 +0100
 Exclude more crap.
 r11484 at t0mlaptop (orig r11454):  t0m | 2009-10-05 22:30:59 +0100
 Why is 4 randomly hard coded there. If we can't get it from the right place, go bang
 r11649 at t0mlaptop (orig r11614):  autarch | 2009-10-18 18:18:15 +0100
 Fix the "eternally growing stack trace" problem with the restarter.
 
 Added this to changes, and cleaned up Changes text for the other change in there.
 r11650 at t0mlaptop (orig r11615):  autarch | 2009-10-18 18:19:18 +0100
 Clarify comment.
 
 r11651 at t0mlaptop (orig r11616):  t0m | 2009-10-18 18:35:51 +0100
 Bump versions
 r11673 at t0mlaptop (orig r11638):  autarch | 2009-10-20 03:37:31 +0100
 Fixed a typo in Changes
 
 r11690 at t0mlaptop (orig r11655):  jawnsy | 2009-10-21 03:49:58 +0100
 Bring copyright statement in sync with the other packages
 r11817 at t0mlaptop (orig r11782):  dew | 2009-11-07 19:19:38 +0000
 Don't monitor t/, root/ and hidden dirs
 r11818 at t0mlaptop (orig r11783):  dew | 2009-11-07 22:22:08 +0000
 Add entry in Changes describing r11782
 r12036 at t0mlaptop (orig r12001):  kasimon | 2009-11-24 13:53:49 +0000
 Added POD description for some methods.
 Added debian-specific files to ignore list.
 Fixed subversion pattern in ignore list.
 
 r12037 at t0mlaptop (orig r12002):  kasimon | 2009-11-24 14:28:38 +0000
 Add Changes entry for last commit



Property changes on: Catalyst-Devel/1.00/branches/helper_refactor
___________________________________________________________________
Name: svn:ignore
   - META.yml
pm_to_blib
blib
inc
Makefile
Makefile.old
MANIFEST
MANIFEST.bak


   + MANIFEST
MANIFEST.bak
Makefile.old
META.yml
pm_to_blib
blib
inc
Makefile
Makefile.old
MANIFEST
MANIFEST.bak


Name: svk:merge
   - 4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Devel/1.00/trunk:10253
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst-Devel:6899
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst-Helper:4258
6d45476b-5895-46b8-b13a-8b969fa34c98:/local/Catalyst-Devel-helper-refactor:11494
   + 4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Devel/1.00/trunk:12002
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst-Devel:6899
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst-Helper:4258
6d45476b-5895-46b8-b13a-8b969fa34c98:/local/Catalyst-Devel-helper-refactor:11494

Modified: Catalyst-Devel/1.00/branches/helper_refactor/Changes
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/Changes	2009-11-26 22:46:26 UTC (rev 12036)
+++ Catalyst-Devel/1.00/branches/helper_refactor/Changes	2009-11-26 22:52:46 UTC (rev 12037)
@@ -1,33 +1,39 @@
 This file documents the revision history for Perl extension Catalyst-Devel.
 
-NOO-STUFFS 2009-06-17
-         - added File::ShareDir capabilities
-         - added Path::Class::Dir and Path::Class:File for ease of F::ShareDir
-           file manip
-         - modified the following methods:
-         --  _mk_appclass    - sends the new filename to be rendered
-         --  _mk_rootclass   - ''
-         --  _mk_makefile    - ''
-         --  _mk_config      - ''
-         --  _mk_readme      - ''
-         --  _mk_changes     - ''
-         --  _mk_apptest     - ''
-         --  _mk_cgi         - ''
-         --  _mk_fastcgi     - ''
-         --  _mk_server      - ''
-         --  _mk_test        - ''
-         --  _mk_create      - ''
-         --  _mk_compclass   - ''
-         --  _mk_comptestsub - ''
-         --  _mk_images      - ''
-         --  _mk_images      - ''
-         --  _mk_favicon     - ''
-         --  render_file     - this now calls render_file_contents to DTRT
-         - new methods:
-         -- get_sharedir_file    - this grabs a file out of share/ dir
-         -- render_sharedir_file - this renders our sharedir file properly, using render_file_contents
+        - Exclude root/, t/ and hidden dirs from file change monitoring when
+          using File::ChangeNotify 0.08+. (dew)
+        - Updated POD of Module/Install/Catalyst.pm and added to the list
+          of ignored files/directories. (Karsten Heymann)
 
+1.21   2009-10-18 18:33:33
+        - The Restarter code caused stack traces for certain types of errors
+          to grow longer and longer with every restart. (Dave Rolsky)
 
+        - Fixed an issue with the Restarter in Win32 where @INC didn't get
+          passed along when restarting.
+
+1.20    2009-08-11 23:30:30
+        - Bump required File::ChangeNotify version to 0.07. Closes RT#48610.
+
+1.19    2009-06-29 00:36:50
+        - Update Module::Install to a version that doesn't screw up
+          auto_install anymore (Closes: RT#45784).
+        - Generate Makefile.PLs with unix-paths, even on windows (Closes:
+          RT#46059).
+
+1.18    2009-06-10 17:43:12
+        - The forking restarter was not waiting for the child to exit,
+          which could lead to a race condition. If the old child did
+          not exit before the new child tried to bind to its socket,
+          it would find the old child blocking the port it wanted.
+        - More fixes for the Win32 restarter. It was effectively
+          ignoring all command-line options except those related to
+          the restarter itself.
+
+1.17    2009-05-24 18:18:17
+        - Catalyst::Restarter::Forking loaded the threads and
+          Thread::Cancel modules, even though it doesn't need them.
+
 1.16    2009-05-23 17:29:29
         - Catalyst prereq changed to 5.80. Thanks, kold! (jhannah)
         - Fixed the restarter to actually work on Win32. The fix means

Modified: Catalyst-Devel/1.00/branches/helper_refactor/Makefile.PL
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/Makefile.PL	2009-11-26 22:46:26 UTC (rev 12036)
+++ Catalyst-Devel/1.00/branches/helper_refactor/Makefile.PL	2009-11-26 22:52:46 UTC (rev 12037)
@@ -1,4 +1,4 @@
-use inc::Module::Install 0.87;
+use inc::Module::Install 0.91;
 
 name     'Catalyst-Devel';
 all_from 'lib/Catalyst/Devel.pm';
@@ -11,9 +11,9 @@
 requires 'Catalyst::Plugin::Static::Simple' => '0.16';
 requires 'Catalyst::Plugin::ConfigLoader';
 requires 'Config::General' => '2.42'; # as of 1.07, we use .conf and not .yaml
-requires 'File::ChangeNotify' => '0.03';
+requires 'File::ChangeNotify' => '0.07';
 requires 'File::Copy::Recursive';
-requires 'Module::Install' => '0.64';
+requires 'Module::Install' => '0.91';
 requires 'parent'; # as of 1.04
 requires 'Path::Class' => '0.09';
 requires 'Template'    => '2.14';

Modified: Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Devel.pm
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Devel.pm	2009-11-26 22:46:26 UTC (rev 12036)
+++ Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Devel.pm	2009-11-26 22:52:46 UTC (rev 12037)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-our $VERSION             = '1.16';
+our $VERSION             = '1.21';
 our $CATALYST_SCRIPT_GEN = 40;
 
 $VERSION = eval $VERSION;
@@ -37,6 +37,12 @@
 
 sri: Sebastian Riedel <sri at cpan.org>
 
+=head1 COPYRIGHT
+
+Copyright (c) 2006 - 2009
+the Catalyst::Devel L</AUTHOR>
+as listed above.
+
 =head1 LICENSE
 
 This library is free software. You can redistribute it and/or modify

Modified: Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Helper.pm
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Helper.pm	2009-11-26 22:46:26 UTC (rev 12036)
+++ Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Helper.pm	2009-11-26 22:52:46 UTC (rev 12037)
@@ -2,6 +2,7 @@
 use Moose;
 use Config;
 use File::Spec;
+use File::Spec::Unix;
 use File::Path;
 use FindBin;
 use IO::File;
@@ -640,7 +641,7 @@
 This method is called by L<create.pl> to make new components
 for your application.
 
-=head3 mk_dir ($path)
+=head2 mk_dir ($path)
 
 Surprisingly, this function makes a directory.
 

Modified: Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Restarter.pm
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Restarter.pm	2009-11-26 22:46:26 UTC (rev 12036)
+++ Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Restarter.pm	2009-11-26 22:52:46 UTC (rev 12037)
@@ -4,6 +4,7 @@
 
 use Cwd qw( abs_path );
 use File::ChangeNotify;
+use File::Spec;
 use FindBin;
 use namespace::clean -except => 'meta';
 
@@ -55,8 +56,19 @@
     delete $p->{start_sub};
 
     $p->{filter} ||= qr/(?:\/|^)(?![.#_]).+(?:\.yml$|\.yaml$|\.conf|\.pm)$/;
-    $p->{directories} ||= abs_path( File::Spec->catdir( $FindBin::Bin, '..' ) );
 
+    my $app_root = abs_path( File::Spec->catdir( $FindBin::Bin, '..' ) );
+
+    # Monitor application root dir
+    $p->{directories} ||= $app_root;
+
+    # exclude t/, root/ and hidden dirs
+    $p->{exclude} ||= [
+        File::Spec->catdir($app_root, 't'),
+        File::Spec->catdir($app_root, 'root'),
+        qr(/\.[^/]*/?$),    # match hidden dirs
+    ];
+
     # We could make this lazily, but this lets us check that we
     # received valid arguments for the watcher up front.
     $self->_watcher( File::ChangeNotify->instantiate_watcher( %{$p} ) );
@@ -75,8 +87,14 @@
 sub _restart_on_changes {
     my $self = shift;
 
-    my @events = $self->_watcher->wait_for_events();
-    $self->_handle_events(@events);
+    # We use this loop in order to avoid having _handle_events() call back
+    # into this method. We used to do that, and the end result was that stack
+    # traces became longer and longer with every restart. Using this loop, the
+    # portion of the stack trace that covers this code does not grow.
+    while (1) {
+        my @events = $self->_watcher->wait_for_events();
+        $self->_handle_events(@events);
+    }
 }
 
 sub _handle_events {
@@ -99,8 +117,6 @@
     $self->_kill_child;
 
     $self->_fork_and_start;
-
-    $self->_restart_on_changes;
 }
 
 sub DEMOLISH {

Modified: Catalyst-Devel/1.00/branches/helper_refactor/lib/Module/Install/Catalyst.pm
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/lib/Module/Install/Catalyst.pm	2009-11-26 22:46:26 UTC (rev 12036)
+++ Catalyst-Devel/1.00/branches/helper_refactor/lib/Module/Install/Catalyst.pm	2009-11-26 22:52:46 UTC (rev 12037)
@@ -15,22 +15,33 @@
 
 our @IGNORE =
   qw/Build Build.PL Changes MANIFEST META.yml Makefile.PL Makefile README
-  _build blib lib script t inc \.svn \.git _darcs \.bzr \.hg/;
+  _build blib lib script t inc .*\.svn \.git _darcs \.bzr \.hg
+  debian build-stamp install-stamp configure-stamp/;
 our @CLASSES   = ();
 our $ENGINE    = 'CGI';
 our $CORE      = 0;
 our $MULTIARCH = 0;
-our $SCRIPT;
-our $USAGE;
+our $SCRIPT    = '';
+our $USAGE     = '';
 
 =head1 NAME
 
-Module::Install::Catalyst - Module::Install extension for Catalyst
-
+  Module::Install::Catalyst - Module::Install extension for Catalyst
+  
 =head1 SYNOPSIS
+  
+  use inc::Module::Install;
+  
+  name 'MyApp';
+  all_from 'lib/MyApp.pm';
+  
+  requires 'Catalyst::Runtime' => '5.7014';
+  
+  catalyst_ignore('.*temp');
+  catalyst_ignore('.*tmp');
+  catalyst;
+  WriteAll;
 
-See L<Catalyst>
-
 =head1 DESCRIPTION
 
 L<Module::Install> extension for Catalyst.
@@ -39,6 +50,9 @@
 
 =head2 catalyst
 
+Calls L<catalyst_files> and L<catalyst_par>. Should be the last catalyst*
+command called in C<Makefile.PL>.
+
 =cut
 
 sub catalyst {
@@ -55,6 +69,10 @@
 
 =head2 catalyst_files
 
+Collect a list of all files a Catalyst application consists of and copy it  
+inside the blib/lib/ directory. Files and directories that match the modules 
+ignore list are excluded (see L<catalyst_ignore> and L<catalyst_ignore_all>).
+
 =cut
 
 sub catalyst_files {
@@ -81,6 +99,8 @@
 
 =head2 catalyst_ignore_all(\@ignore)
 
+This function replaces the built-in default ignore list with the given list.
+
 =cut
 
 sub catalyst_ignore_all {
@@ -90,6 +110,8 @@
 
 =head2 catalyst_ignore(\@ignore)
 
+Add a regexp to the list of ignored patterns. Can be called multiple times.
+
 =cut
 
 sub catalyst_ignore {
@@ -104,6 +126,7 @@
 # Workaround for a namespace conflict
 sub catalyst_par {
     my ( $self, $par ) = @_;
+    $par ||= '';
     return if $SAFETY;
     $SAFETY++;
     my $name  = $self->name;




More information about the Catalyst-commits mailing list