[Moose-commits] r7761 - in Moose/trunk: author
lib/Moose/Cookbook/Basics lib/Moose/Cookbook/Extending
lib/Moose/Cookbook/Roles
autarch at code2.0beta.co.uk
autarch at code2.0beta.co.uk
Sat Feb 21 19:15:46 GMT 2009
Author: autarch
Date: 2009-02-21 11:15:45 -0800 (Sat, 21 Feb 2009)
New Revision: 7761
Modified:
Moose/trunk/author/extract-inline-tests
Moose/trunk/lib/Moose/Cookbook/Basics/Recipe4.pod
Moose/trunk/lib/Moose/Cookbook/Basics/Recipe5.pod
Moose/trunk/lib/Moose/Cookbook/Extending/Recipe3.pod
Moose/trunk/lib/Moose/Cookbook/Roles/Recipe3.pod
Log:
A hack I think will fix the formatting on search.cpan.
search.cpan seems to dislike a =begin block that isn't a single
word. Hopefully it accepts dashes.
If search.cpan wasn't a fucking closed source app I could actually
look at the code and figure this out.
Modified: Moose/trunk/author/extract-inline-tests
===================================================================
--- Moose/trunk/author/extract-inline-tests 2009-02-21 15:28:35 UTC (rev 7760)
+++ Moose/trunk/author/extract-inline-tests 2009-02-21 19:15:45 UTC (rev 7761)
@@ -27,9 +27,10 @@
\n=for[ \t]+example[ \t]+end\s*? # ... until the =for example end
(?:\n|$) # ... at the end of file or a newline
| # OR
- =begin[ \t]+(?:test|testing)\b # ... when we find a =begin test or testing
- .*? # ... and keep capturing
- \n=end[ \t]+(?:test|testing)\s*? # ... until an =end tag
+ =begin[ \t]+(?:test|testing)(?:-SETUP)? # ... when we find a =begin test or testing
+ .*? # ... and keep capturing
+ \n=end[ \t]+(?:test|testing)(?:-SETUP)? # ... until an =end tag
+ .*?
(?:\n|$) # ... at the end of file or a newline
) # ... and stop capturing
/isx;
@@ -42,10 +43,14 @@
# A hack to turn the SYNOPSIS into something Test::Inline
# doesn't barf on
- if ( $elt =~ s/=head1[ \t]+SYNOPSIS/=begin testing SETUP\n\n{/ ) {
- $elt .= "}\n\n=end testing SETUP";
+ if ( $elt =~ s/=head1[ \t]+SYNOPSIS/=begin testing-SETUP\n\n{/ ) {
+ $elt .= "}\n\n=end testing-SETUP";
}
+ # It seems like search.cpan doesn't like a name with
+ # spaces after =begin. bleah, what a mess.
+ $elt =~ s/testing-SETUP/testing SETUP/g;
+
push @elements, $elt;
}
Modified: Moose/trunk/lib/Moose/Cookbook/Basics/Recipe4.pod
===================================================================
--- Moose/trunk/lib/Moose/Cookbook/Basics/Recipe4.pod 2009-02-21 15:28:35 UTC (rev 7760)
+++ Moose/trunk/lib/Moose/Cookbook/Basics/Recipe4.pod 2009-02-21 19:15:45 UTC (rev 7761)
@@ -1,7 +1,7 @@
=pod
-=begin testing SETUP
+=begin testing-SETUP
BEGIN {
eval 'use Regexp::Common; use Locale::US;';
@@ -12,7 +12,7 @@
}
}
-=end testing
+=end testing-SETUP
=head1 NAME
Modified: Moose/trunk/lib/Moose/Cookbook/Basics/Recipe5.pod
===================================================================
--- Moose/trunk/lib/Moose/Cookbook/Basics/Recipe5.pod 2009-02-21 15:28:35 UTC (rev 7760)
+++ Moose/trunk/lib/Moose/Cookbook/Basics/Recipe5.pod 2009-02-21 19:15:45 UTC (rev 7761)
@@ -1,7 +1,7 @@
=pod
-=begin testing SETUP
+=begin testing-SETUP
BEGIN {
eval 'use HTTP::Headers; use Params::Coerce; use URI;';
@@ -12,7 +12,7 @@
}
}
-=end testing
+=end testing-SETUP
=head1 NAME
Modified: Moose/trunk/lib/Moose/Cookbook/Extending/Recipe3.pod
===================================================================
--- Moose/trunk/lib/Moose/Cookbook/Extending/Recipe3.pod 2009-02-21 15:28:35 UTC (rev 7760)
+++ Moose/trunk/lib/Moose/Cookbook/Extending/Recipe3.pod 2009-02-21 19:15:45 UTC (rev 7761)
@@ -1,7 +1,7 @@
=pod
-=begin testing SETUP
+=begin testing-SETUP
BEGIN {
eval 'use Test::Warn 0.11;';
@@ -12,7 +12,7 @@
}
}
-=end testing
+=end testing-SETUP
=head1 NAME
Modified: Moose/trunk/lib/Moose/Cookbook/Roles/Recipe3.pod
===================================================================
--- Moose/trunk/lib/Moose/Cookbook/Roles/Recipe3.pod 2009-02-21 15:28:35 UTC (rev 7760)
+++ Moose/trunk/lib/Moose/Cookbook/Roles/Recipe3.pod 2009-02-21 19:15:45 UTC (rev 7761)
@@ -2,7 +2,7 @@
=pod
-=begin testing SETUP
+=begin testing-SETUP
{
# Not in the recipe, but needed for writing tests.
@@ -23,7 +23,7 @@
);
}
-=end testing
+=end testing-SETUP
=head1 NAME
More information about the Moose-commits
mailing list