summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-07-08 23:17:20 -0500
committerJesse Luehrs <doy@tozt.net>2011-07-08 23:18:08 -0500
commit64d9de92677b6ea344ab1c1e09fd71428120ef1d (patch)
tree3f961d336fa92c5e4c97c8c20781fad59cafe5d8 /lib
parent6c7d5e2e4024df3b3d0f54bab14909ddfcd478c0 (diff)
downloadsmartmatch-engine-rjbs-master.tar.gz
smartmatch-engine-rjbs-master.zip
split this into its own distHEADmaster
Diffstat (limited to 'lib')
-rw-r--r--lib/smartmatch.pm39
-rw-r--r--lib/smartmatch/engine/rjbs.pm1
2 files changed, 1 insertions, 39 deletions
diff --git a/lib/smartmatch.pm b/lib/smartmatch.pm
deleted file mode 100644
index 071e4ea..0000000
--- a/lib/smartmatch.pm
+++ /dev/null
@@ -1,39 +0,0 @@
-package smartmatch;
-use strict;
-use warnings;
-use 5.010;
-# ABSTRACT: pluggable smart matching backends
-
-use parent 'DynaLoader';
-use B::Hooks::OP::Check;
-
-sub dl_load_flags { 0x01 }
-
-__PACKAGE__->bootstrap(
- # we need to be careful not to touch $VERSION at compile time, otherwise
- # DynaLoader will assume it's set and check against it, which will cause
- # fail when being run in the checkout without dzil having set the actual
- # $VERSION
- exists $smartmatch::{VERSION}
- ? ${ $smartmatch::{VERSION} } : (),
-);
-
-sub import {
- my $package = shift;
- my ($cb) = @_;
-
- if (!ref($cb)) {
- my $engine = "smartmatch::engine::$cb";
- eval "require $engine; 1"
- or die "Couldn't load smartmatch engine $engine: $@";
- $cb = $engine->can('match') unless ref($cb);
- }
-
- smartmatch::register($cb);
-}
-
-sub unimport {
- smartmatch::unregister();
-}
-
-1;
diff --git a/lib/smartmatch/engine/rjbs.pm b/lib/smartmatch/engine/rjbs.pm
index da40998..b25ab8c 100644
--- a/lib/smartmatch/engine/rjbs.pm
+++ b/lib/smartmatch/engine/rjbs.pm
@@ -1,6 +1,7 @@
package smartmatch::engine::rjbs;
use strict;
use warnings;
+# ABSTRACT: implementation of rjbs's smartmatch proposal
use overload ();
use Scalar::Util qw(blessed reftype);