Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use Sub::Exporter and no default export

  • Loading branch information...
commit ee628261bdc94cb99a3ecf684d730a754ced9990 1 parent 4bcf21f
@renormalist authored
Showing with 4 additions and 7 deletions.
  1. +3 −6 lib/Scalar/Util/reftype/Inline.pm
  2. +1 −1  t/basic.t
View
9 lib/Scalar/Util/reftype/Inline.pm
@@ -11,12 +11,9 @@ XSLoader::load(__PACKAGE__);
sub reftype { die 42 }
-sub import {
- $^H{ __PACKAGE__ . '/reftype' } = 1;
- my $caller = caller;
- no strict 'refs';
- *{ join q{::} => $caller, 'reftype' } = \&reftype;
-}
+use Sub::Exporter -setup => {
+ exports => [qw(reftype)],
+};
sub unimport {
$^H{ __PACKAGE__ . '/reftype' } = 0;
View
2  t/basic.t
@@ -2,7 +2,7 @@ use strict;
use warnings;
use Test::More;
-use Scalar::Util::reftype::Inline;
+use Scalar::Util::reftype::Inline "reftype";
use Scalar::Util ();
Please sign in to comment.
Something went wrong with that request. Please try again.