X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Fre-engine-Plugin.git;a=blobdiff_plain;f=Plugin.pm;h=d8fa3228907fb93a2913975be35c7a4769e8a26d;hp=80fa3892b81e68fcbaf1013a024cc009ee4473c0;hb=74d4856719cde7c6dc286b0c3e5dc78112d2fbff;hpb=dd88e700bfcc92fc03db9d994ec747ca1c14ade7 diff --git a/Plugin.pm b/Plugin.pm index 80fa389..d8fa322 100644 --- a/Plugin.pm +++ b/Plugin.pm @@ -1,11 +1,13 @@ # See Plugin.pod for documentation package re::engine::Plugin; use 5.009005; -use base 'Regexp'; use strict; use XSLoader (); -our $VERSION = '0.04_01'; +our $VERSION = '0.04'; + +# All engines should subclass the core Regexp package +our @ISA = 'Regexp'; XSLoader::load __PACKAGE__, $VERSION; @@ -26,7 +28,7 @@ sub import my ($pkg, %sub) = @_; # Valid callbacks - my @callback = qw(comp exec); #intuit checkstr free dupe); + my @callback = qw(comp exec); for (@callback) { next unless exists $sub{$_}; @@ -83,15 +85,4 @@ sub num_captures } } -sub named_captures -{ - my ($re, %callback) = @_; - - for my $key (keys %callback) { - $key =~ y/a-z/A-Z/; # ASCII uc - my $name = '_named_capture_buff_' . $key; - $re->$name( $callback{$key} ); - } -} - 1;