From: Vincent Pit Date: Tue, 19 Aug 2008 17:28:00 +0000 (+0000) Subject: This is 0.06 X-Git-Tag: v0.06^0 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Fre-engine-Plugin.git;a=commitdiff_plain;h=7ac9fe3386ed833a9a322e62dc85215abf20bf30;hp=2271b6d1ae428e049a8789a04cde87a812b0830f This is 0.06 --- diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index d21dd78..0000000 --- a/ChangeLog +++ /dev/null @@ -1,35 +0,0 @@ -2008-08-19 Ævar Arnfjörð Bjarmason (0.05) - - * Plugin.pm: dos2unix - * Plugin.xs: RT#31635: Be compatable with threaded perls - -2007-12-27 Ævar Arnfjörð Bjarmason (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 (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 (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 (0.01) - - * Initial release diff --git a/Makefile.PL b/Makefile.PL index b527708..bfb1d13 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -11,3 +11,15 @@ WriteMakefile( TESTS => 't/*.t t/*/*.t t/*/*/*.t', }, ); + +sub MY::postamble { + return <ChangeLog + +META.yml: Makefile + touch META.yml + +END +} + diff --git a/Plugin.pm b/Plugin.pm index 5b84612..26479aa 100644 --- 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'; diff --git a/Plugin.pod b/Plugin.pod index 76e8b3a..dec530e 100644 --- a/Plugin.pod +++ b/Plugin.pod @@ -19,12 +19,12 @@ C or runtime for C 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) 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 below. +C<$^H{regcomp}> (as described in L and L) 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 below. The callbacks (e.g. L) then get called with a L 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, diff --git a/Plugin.xs b/Plugin.xs index 32b2eae..8486171 100644 --- 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); diff --git a/t/methods.t b/t/methods.t index 6df32fa..e939407 100644 --- a/t/methods.t +++ b/t/methods.t @@ -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