]> git.vpit.fr Git - perl/modules/Variable-Magic.git/blobdiff - lib/Variable/Magic.pm
Importing Variable-Magic-0.07_02.tar.gz
[perl/modules/Variable-Magic.git] / lib / Variable / Magic.pm
index 74baa34ebd627de2e32af6977ca4d310f299b435..11a26a8511362af310831fe5f72ec10008860e3e 100644 (file)
@@ -1,5 +1,7 @@
 package Variable::Magic;
 
+use 5.007003;
+
 use strict;
 use warnings;
 
@@ -11,11 +13,15 @@ Variable::Magic - Associate user-defined magic to variables from Perl.
 
 =head1 VERSION
 
-Version 0.03
+Version 0.07_02
 
 =cut
 
-our $VERSION = '0.03';
+use vars qw/$VERSION/;
+
+BEGIN {
+ $VERSION = '0.07_02';
+}
 
 =head1 SYNOPSIS
 
@@ -94,13 +100,27 @@ The maximum integer used as a signature for user-defined magic.
 
     SIG_NBR = SIG_MAX - SIG_MIN + 1
 
+=head2 C<MGf_COPY>
+
+True iff the 'copy' magic is available.
+
+=head2 C<MGf_DUP>
+
+True iff the 'dup' magic is available.
+
+=head2 C<MGf_LOCAL>
+
+True iff the 'local' magic is available.
+
 =head1 FUNCTIONS
 
 =cut
 
-require XSLoader;
+use XSLoader;
 
-XSLoader::load(__PACKAGE__, $VERSION);
+BEGIN {
+ XSLoader::load __PACKAGE__, $VERSION;
+}
 
 =head2 C<wizard>
 
@@ -134,7 +154,8 @@ Code references to corresponding magic callbacks. You don't have to specify all
 sub wizard {
  croak 'Wrong number of arguments for wizard()' if @_ % 2;
  my %opts = @_;
- return _wizard(map { $opts{$_} } qw/sig get set len clear free data/);
+ my $sig = $opts{sig};
+ return _wizard($sig, map { $opts{$_} } qw/data get set len clear free copy dup local fetch store exists delete/);
 }
 
 =head2 C<gensig>
@@ -194,16 +215,18 @@ use base qw/Exporter/;
 our @EXPORT         = ();
 our %EXPORT_TAGS    = (
  'funcs' =>  [ qw/wizard gensig getsig cast getdata dispell/ ],
- 'consts' => [ qw/SIG_MIN SIG_MAX SIG_NBR/ ]
+ 'consts' => [ qw/SIG_MIN SIG_MAX SIG_NBR MGf_COPY MGf_DUP MGf_LOCAL/ ]
 );
 our @EXPORT_OK      = map { @$_ } values %EXPORT_TAGS;
 $EXPORT_TAGS{'all'} = \@EXPORT_OK;
 
 =head1 DEPENDENCIES
 
+L<perl> 5.7.3.
+
 L<Carp> (standard since perl 5), L<XSLoader> (standard since perl 5.006).
 
-Tests use L<Symbol> (standard since perl 5.002).
+Glob tests need L<Symbol> (standard since perl 5.002).
 
 =head1 SEE ALSO