This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add alloccopstash provisionally to the API
[perl5.git] / ext / XS-APItest / APItest.pm
index 1427e0d..0eff22e 100644 (file)
@@ -5,6 +5,8 @@ use strict;
 use warnings;
 use Carp;
 
+our $VERSION = '0.40';
+
 require XSLoader;
 
 # Export everything since these functions are only used by a test script
@@ -24,6 +26,8 @@ sub import {
            if ($sym_name =~ /::$/) {
                # Skip any subpackages that are clearly OO
                next if *{$glob}{HASH}{'new'};
+               # and any that have AUTOLOAD
+               next if *{$glob}{HASH}{AUTOLOAD};
                push @stashes, "$stash_name$sym_name", *{$glob}{HASH};
            } elsif (ref $glob eq 'SCALAR' || *{$glob}{CODE}) {
                if ($exports) {
@@ -36,7 +40,7 @@ sub import {
        }
     }
     foreach (keys %{$exports||{}}) {
-       next unless /\A(?:rpn|calcrpn|stufftest|swaptwostmts|looprest|scopelessblock|stmtasexpr|stmtsasexpr|loopblock|blockasexpr|swaplabel|labelconst)\z/;
+       next unless /\A(?:rpn|calcrpn|stufftest|swaptwostmts|looprest|scopelessblock|stmtasexpr|stmtsasexpr|loopblock|blockasexpr|swaplabel|labelconst|arrayfullexpr|arraylistexpr|arraytermexpr|arrayarithexpr|arrayexprflags)\z/;
        $^H{"XS::APItest/$_"} = 1;
        delete $exports->{$_};
     }
@@ -50,8 +54,6 @@ sub import {
     }
 }
 
-our $VERSION = '0.26';
-
 use vars '$WARNINGS_ON_BOOTSTRAP';
 use vars map "\$${_}_called_PP", qw(BEGIN UNITCHECK CHECK INIT END);
 
@@ -94,6 +96,9 @@ if ($WARNINGS_ON_BOOTSTRAP) {
     XSLoader::load();
 }
 
+# This XS function needs the lvalue attr applied.
+eval 'use attributes __PACKAGE__, \\&lv_temp_object, "lvalue"; 1' or die;
+
 1;
 __END__
 
@@ -209,6 +214,11 @@ correctly by C<printf>.
 
 Output is sent to STDOUT.
 
+=item B<filter>
+
+Installs a source filter that substitutes "e" for "o" (witheut regard fer
+what it might be medifying).
+
 =item B<call_sv>, B<call_pv>, B<call_method>
 
 These exercise the C calls of the same names. Everything after the flags