]> git.vpit.fr Git - perl/modules/re-engine-Plugin.git/blobdiff - Plugin.pm
Importing re-engine-Plugin-0.04.tar.gz
[perl/modules/re-engine-Plugin.git] / Plugin.pm
index 80fa3892b81e68fcbaf1013a024cc009ee4473c0..d8fa3228907fb93a2913975be35c7a4769e8a26d 100644 (file)
--- a/Plugin.pm
+++ b/Plugin.pm
@@ -1,11 +1,13 @@
 # See Plugin.pod for documentation\r
 package re::engine::Plugin;\r
 use 5.009005;\r
-use base 'Regexp';\r
 use strict;\r
 use XSLoader ();\r
 \r
-our $VERSION = '0.04_01';\r
+our $VERSION = '0.04';\r
+\r
+# All engines should subclass the core Regexp package\r
+our @ISA = 'Regexp';\r
 \r
 XSLoader::load __PACKAGE__, $VERSION;\r
 \r
@@ -26,7 +28,7 @@ sub import
     my ($pkg, %sub) = @_;\r
 \r
     # Valid callbacks\r
-    my @callback = qw(comp exec); #intuit checkstr free dupe);\r
+    my @callback = qw(comp exec);\r
 \r
     for (@callback) {\r
         next unless exists $sub{$_};\r
@@ -83,15 +85,4 @@ sub num_captures
     }\r
 }\r
 \r
-sub named_captures\r
-{\r
-    my ($re, %callback) = @_;\r
-\r
-    for my $key (keys %callback) {\r
-        $key =~ y/a-z/A-Z/; # ASCII uc\r
-        my $name = '_named_capture_buff_' . $key;\r
-        $re->$name( $callback{$key} );\r
-    }\r
-}\r
-\r
 1;\r