]> git.vpit.fr Git - perl/modules/re-engine-Plugin.git/commitdiff
This is 0.06 v0.06
authorVincent Pit <vince@profvince.com>
Tue, 19 Aug 2008 17:28:00 +0000 (17:28 +0000)
committerVincent Pit <vince@profvince.com>
Tue, 19 Aug 2008 17:28:00 +0000 (17:28 +0000)
ChangeLog [deleted file]
Makefile.PL
Plugin.pm
Plugin.pod
Plugin.xs
t/methods.t

diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644 (file)
index d21dd78..0000000
--- a/ChangeLog
+++ /dev/null
@@ -1,35 +0,0 @@
-2008-08-19  Ævar Arnfjörð Bjarmason  <avar@cpan.org> (0.05)
-
-       * Plugin.pm: dos2unix
-       * Plugin.xs: RT#31635: Be compatable with threaded perls
-
-2007-12-27  Ævar Arnfjörð Bjarmason  <avar@cpan.org> (0.04)
-
-       * Plugin.pm: Setting @ISA instead of using base.pm
-       * Makefile.PL: Now using ExtUtils::MakeMaker instead of Module::Install
-       * Plugin.(xs|h): Fix up prototypes to match the callbacks in the actual 5.10 release
-       * Plugin.xs: Dumped CODE: in favor of PPCODE:, the former is teh sux
-       * Plugin.xs: Minor cleanups here and there
-       * Plugin.pod: New todo and a developer release notice
-       * Plugin.[h|pm]: Named buffer callbacks
-       * t/methods/stash.t: Test return value of $rx->stash({});
-       * t/methods/str/modify.t: New test for modification of ->str when
-                                 a reference is used
-       * t/methods/str/types.t: This was testing pattern types, fixed
-       * t/Example.[t|pm]: Moved to t/usage
-
-2007-05-17 Ævar Arnfjörð Bjarmason <avar@cpan.org> (0.03)
-
-       * Plugin.xs: The exec callback would call_sv on a NULL value
-         causing a segfault
-       * Plugin.pod: Use %hash ~~ 'i' instead of $hash{i}, more stylish!
-       * inc: Bumping Module::Install to 0.65
-
-2007-05-17 Ævar Arnfjörð Bjarmason <avar@cpan.org> (0.02)
-
-       * Brought up to date with current blead after lots of hacking on
-         blead itself, too many changes to list
-
-2007-02-18 Ævar Arnfjörð Bjarmason <avar@cpan.org> (0.01)
-
-       * Initial release
index b52770831d95064b0d56a1e2ca38f72e550bcb08..bfb1d137a1f528f2fa5145ec5e9bbf0a4fa6fa85 100644 (file)
@@ -11,3 +11,15 @@ WriteMakefile(
         TESTS => 't/*.t t/*/*.t t/*/*/*.t',\r
     },\r
 );\r
+\r
+sub MY::postamble {\r
+    return <<END;\r
+ChangeLog: Makefile\r
+       git log --pretty=full . >ChangeLog\r
+\r
+META.yml: Makefile\r
+       touch META.yml\r
+\r
+END\r
+}\r
+\r
index 5b84612f64e9e5aab60691897fa13bdb868164ad..26479aad429cd9f0273817e523d4b352eb3e7a2b 100644 (file)
--- a/Plugin.pm
+++ b/Plugin.pm
@@ -4,7 +4,7 @@ use 5.009005;
 use strict;
 use XSLoader ();
 
-our $VERSION = '0.05';
+our $VERSION = '0.06';
 
 # All engines should subclass the core Regexp package
 our @ISA = 'Regexp';
index 76e8b3a7971423c35c7c1f010701aa4a2b73b21a..dec530e1554e63ce7db18a98f98b3a33117a7e0c 100644 (file)
@@ -19,12 +19,12 @@ C</pattern/> or runtime for C<qr//> patterns, or something inbetween
 depending on variable interpolation etc.
 
 When this module is loaded into a scope it inserts a hook into
-C<$^H{regcomp}> (as described in L<perlreapi>) to have each regexp
-constructed in its lexical scope handled by this engine, but it
-differs from other engines in that it also inserts other hooks into
-C<%^H> in the same scope that point to user-defined subroutines to use
-during compilation, execution etc, these are described in
-L</CALLBACKS> below.
+C<$^H{regcomp}> (as described in L<perlreapi> and L<perlpragma>) to
+have each regexp constructed in its lexical scope handled by this
+engine, but it differs from other engines in that it also inserts
+other hooks into C<%^H> in the same scope that point to user-defined
+subroutines to use during compilation, execution etc, these are
+described in L</CALLBACKS> below.
 
 The callbacks (e.g. L</comp>) then get called with a
 L<re::engine::Plugin> object as their first argument. This object
@@ -51,7 +51,7 @@ caller's scope use use the following snippet:
 
     sub import
     {
-        # Populates the caller's %^H with our callbacks
+        # Sets the caller's $^H{regcomp} his %^H with our callbacks
         re::engine::Plugin->import(
             comp => \&comp,
             exec => \&exec,
index 32b2eae9d96c5950e130f9092241b852f9d31369..8486171a3cd74f3558066b8aa89386400e356f58 100644 (file)
--- a/Plugin.xs
+++ b/Plugin.xs
@@ -44,13 +44,11 @@ Plugin_comp(pTHX_ const SV * const pattern, const U32 flags)
     dSP;
     REGEXP * rx;
     re__engine__Plugin re;
-    I32 count;
     I32 buffers;
 
     /* exp/xend version of the pattern & length */
     STRLEN plen;
     char*  exp = SvPV((SV*)pattern, plen);
-    char* xend = exp + plen;
 
     /* The REGEXP structure to return to perl */
     Newxz(rx, 1, REGEXP);
@@ -210,7 +208,7 @@ Plugin_free(pTHX_ REGEXP * const rx)
 }
 
 void *
-Plugin_dupe(pTHX_ const REGEXP * rx, CLONE_PARAMS *param)
+Plugin_dupe(pTHX_ REGEXP * const rx, CLONE_PARAMS *param)
 {
     Perl_croak(aTHX_ "dupe not supported yet");
     return rx->pprivate;
@@ -261,7 +259,6 @@ Plugin_numbered_buff_STORE(pTHX_ REGEXP * const rx, const I32 paren,
                            SV const * const value)
 {
     dSP;
-    I32 items;
     SV * callback;
     GET_SELF_FROM_PPRIVATE(rx->pprivate);
 
@@ -290,7 +287,6 @@ Plugin_numbered_buff_LENGTH(pTHX_ REGEXP * const rx, const SV * const sv,
                               const I32 paren)
 {
     dSP;
-    I32 items;
     SV * callback;
     GET_SELF_FROM_PPRIVATE(rx->pprivate);
 
index 6df32fa1a01a20bd756d1b555abae727f74832ee..e939407d3b3a4c4b61772ef2ebc774f8db6e8b72 100644 (file)
@@ -30,7 +30,7 @@ use re::engine::Plugin (
         # modifiers
         my %mod = $re->mod;
         ok(exists $mod{i}, 'str flags /i');
-        ok(exists $mod{x}, 'str flags /i');
+        ok(exists $mod{x}, 'str flags /x');
         like(join('', keys %mod), qr/^[cgimosx]+$/, 'flags contain all-good characters');
 
         # stash