This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Devel::PPPort 3.24 from CPAN.
authorJarkko Hietaniemi <jhi@iki.fi>
Thu, 29 May 2014 18:17:18 +0000 (14:17 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Thu, 29 May 2014 18:17:18 +0000 (14:17 -0400)
25 files changed:
MANIFEST
cpan/Devel-PPPort/Changes [new file with mode: 0644]
cpan/Devel-PPPort/HACKERS
cpan/Devel-PPPort/MANIFEST [new file with mode: 0644]
cpan/Devel-PPPort/MANIFEST.SKIP [new file with mode: 0644]
cpan/Devel-PPPort/META.json [new file with mode: 0644]
cpan/Devel-PPPort/META.yml [new file with mode: 0644]
cpan/Devel-PPPort/Makefile.PL
cpan/Devel-PPPort/PPPort_pm.PL
cpan/Devel-PPPort/README [new file with mode: 0644]
cpan/Devel-PPPort/README.md [new file with mode: 0644]
cpan/Devel-PPPort/TODO [new file with mode: 0644]
cpan/Devel-PPPort/parts/apicheck.pl
cpan/Devel-PPPort/parts/inc/call
cpan/Devel-PPPort/parts/inc/grok
cpan/Devel-PPPort/parts/inc/magic
cpan/Devel-PPPort/parts/inc/misc
cpan/Devel-PPPort/parts/inc/ppphdoc
cpan/Devel-PPPort/parts/inc/ppphtest
cpan/Devel-PPPort/parts/inc/pv_tools
cpan/Devel-PPPort/parts/ppptools.pl
cpan/Devel-PPPort/soak
cpan/Devel-PPPort/t/magic.t
cpan/Devel-PPPort/t/misc.t
cpan/Devel-PPPort/t/ppphtest.t

index f2eab2c..cd40ad5 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -377,6 +377,7 @@ cpan/DB_File/t/db-recno.t   See if DB_File works
 cpan/DB_File/typemap           Berkeley DB extension interface types
 cpan/DB_File/version.c         Berkeley DB extension interface version check
 cpan/Devel-PPPort/apicheck_c.PL                Devel::PPPort apicheck generator
+cpan/Devel-PPPort/Changes      Devel::PPPort
 cpan/Devel-PPPort/devel/buildperl.pl   Devel::PPPort perl version builder
 cpan/Devel-PPPort/devel/devtools.pl    Devel::PPPort development utilities
 cpan/Devel-PPPort/devel/mkapidoc.sh    Devel::PPPort apidoc collector
@@ -386,6 +387,10 @@ cpan/Devel-PPPort/devel/regenerate Devel::PPPort API re-generator
 cpan/Devel-PPPort/devel/scanprov       Devel::PPPort provided API scanner
 cpan/Devel-PPPort/HACKERS              Devel::PPPort hackers documentation
 cpan/Devel-PPPort/Makefile.PL          Devel::PPPort makefile writer
+cpan/Devel-PPPort/MANIFEST     Devel::PPPort
+cpan/Devel-PPPort/MANIFEST.SKIP        Devel::PPPort
+cpan/Devel-PPPort/META.json    Devel::PPPort
+cpan/Devel-PPPort/META.yml     Devel::PPPort
 cpan/Devel-PPPort/mktests.PL           Devel::PPPort test file writer
 cpan/Devel-PPPort/module2.c            Devel::PPPort test file
 cpan/Devel-PPPort/module3.c            Devel::PPPort test file
@@ -628,6 +633,8 @@ cpan/Devel-PPPort/ppport_h.PL               Devel::PPPort ppport.h writer
 cpan/Devel-PPPort/PPPort_pm.PL         Devel::PPPort PPPort.pm writer
 cpan/Devel-PPPort/PPPort.xs            Devel::PPPort dummy PPPort.xs
 cpan/Devel-PPPort/PPPort_xs.PL         Devel::PPPort RealPPPort.xs writer
+cpan/Devel-PPPort/README       Devel::PPPort
+cpan/Devel-PPPort/README.md    Devel::PPPort
 cpan/Devel-PPPort/soak                 Devel::PPPort Test Harness to run under various Perls
 cpan/Devel-PPPort/t/call.t             Devel::PPPort test file
 cpan/Devel-PPPort/t/cop.t              Devel::PPPort test file
@@ -646,6 +653,7 @@ cpan/Devel-PPPort/t/newCONSTSUB.t   Devel::PPPort test file
 cpan/Devel-PPPort/t/newRV.t            Devel::PPPort test file
 cpan/Devel-PPPort/t/newSVpv.t          Devel::PPPort test file
 cpan/Devel-PPPort/t/newSV_type.t       Devel::PPPort test file
+cpan/Devel-PPPort/TODO Devel::PPPort
 cpan/Devel-PPPort/t/podtest.t          Devel::PPPort test file
 cpan/Devel-PPPort/t/ppphtest.t         Devel::PPPort test file
 cpan/Devel-PPPort/t/pvs.t              Devel::PPPort test file
diff --git a/cpan/Devel-PPPort/Changes b/cpan/Devel-PPPort/Changes
new file mode 100644 (file)
index 0000000..650b2f8
--- /dev/null
@@ -0,0 +1,842 @@
+3.24 - 2014-05-08
+
+    * Remove SvREFCNT_dec_NN until it can be implemented
+      properly.
+      (Thanks to bulk88 for reporting GH #10)
+    * Fix GH #11 - compiler warning under clang
+      (Thanks to jhi for reporting it)
+    * Fix GH #12 - compiler warnings
+      (Thanks to jhi for reporting it)
+
+3.23 - 2014-04-12
+
+    * Add support for HeUTF8
+    * Add GetFileContents() to retrieve the contents of the
+      ppport.h file
+    * Update MAX_VER to be 5.20
+    * Update issue tracker to GitHub
+
+3.22 - 2014-03-19
+
+    * Add support for the following API
+        SvREFCNT_dec_NN
+        mg_findext
+        sv_unmagicext
+    * Update META
+        Move bug tracker to github
+        Provide link to repository
+    * Avoid syntax disallowed by C++11
+      (Thanks to Tony C for the patch)
+
+3.21 - 2013-08-17
+
+    * Fix cpan #87870: Merge core perl commit 90b0dc0e2e
+      (Thanks to Father Chrysostomos for the original patch and
+       to Steve Hay for forwarding it)
+    * Fix cpan #86975: Deterministically order API elements in POD
+      (Thanks to Karl Williamson for providing a patch.)
+    * Fix cpan #81796: my $_ is deprecated
+      (Thanks to Nicholas Clark for providing a patch)
+    * Fix cpan #81484: fix isASCII and isCNTRL for inputs > 255
+      (Thanks to Karl Williamson for providing a patch)
+    * Fix cpan #80314: make use of PERL_NO_GET_CONTEXT the default
+    * Fix cpan #79814: Install to 'site' for perl 5.11+
+      (Thanks to Robert Sedlacek for providing a patch)
+    * Fix cpan #78271: Need SvPV_nomg_nolen
+    * Adapt buildperl.pl for newer Perl releases
+    * Update masked_versions regex for 5.005 thread builds
+    * Some tweaks needed to support 5.003 on 64-bit platforms
+
+3.20 - 2011-09-10
+
+    * fix CPAN #56749: isASCII and isCNTRL macros are buggy
+      (thanks to Karl Williamson for providing a patch and patiently
+       waiting almost two years for me to integrate it)
+    * fix CPAN #70427: RealPPPort.xs:1587: error: lvalue required as unary ‘&’ operand
+
+3.19_03 - 2011-04-13
+
+    * keep up with latest core changes
+
+3.19_02 - 2010-03-07
+
+    * fix a warning emitted by the test suite with older perls
+    * added support for the following API
+        newSVpvs_share
+        get_cvn_flags
+        get_cvs
+      (thanks to Goro Fuji for providing a patch to
+      implement all of these, fixes CPAN #47174)
+
+3.19_01 - 2010-02-20
+
+    * fix CPAN #50763: mistaken use of $[
+      (thanks to Zefram for spotting this)
+    * remove spurious PUSHMARK from Perl_ppaddr_t
+      (thanks to Gerard Goossen for providing a patch)
+    * improved support for newer compilers in buildperl.pl
+      (thanks to Philippe Bruhat (BooK) for providing a patch)
+    * added support for the following API
+        memEQs
+        memNEs
+    * lots of small toolchain updates
+
+3.19 - 2009-06-14
+
+    * updated base/todo files
+
+3.18_01 - 2009-06-12
+
+    * fix CPAN #44614: Please support XSBODY
+    * fix CPAN #44655: Please support SVfARG
+    * added support for the following API
+        gv_fetchpvn_flags
+        gv_fetchpvs
+        gv_stashpvs
+        GvSVn
+        HvNAME_get
+        HvNAMELEN_get
+        isGV_with_GP
+        newSV_type
+        PL_error_count
+        PL_in_my
+        PL_in_my_stash
+        SVfARG
+        XSPROTO
+      (thanks to Goro Fuji for providing a patch to
+      implement almost all of these, fixes CPAN #44087)
+
+3.18 - 2009-06-12
+
+    * remove MAN3PODS option from Makefile.PL, which is
+      no longer needed (thanks to Nicholas Clark for
+      providing a patch)
+    * adapt mktests.PL for new layout of ext modules in
+      the core
+
+3.17 - 2009-03-15
+
+    * rework PTR macros, fixing PTR2ul for 5.6.1
+      (fixes CPAN #39802, thanks to CHOCOLATE for
+       reporting and providing a patch)
+    * added support for the following API
+        PTR2nat
+      (second part of fix for CPAN #39802)
+
+3.16 - 2009-01-23
+
+    * fix DEFSV_set() for threaded 5.005 perls
+    * add G_METHOD support to call_sv()
+
+3.15 - 2009-01-18
+
+    * added support for the following API
+        DEFSV_set
+    * fix --unstrip for development versions
+
+3.14_05 - 2008-10-31
+
+    * fix stupid bugs in pv_pretty tests (only the
+      tests were broken, ppport.h was find)
+
+3.14_04 - 2008-10-30
+
+    * added support for the following API
+        isALNUMC  [depend]
+        isASCII
+        isBLANK
+        isCNTRL
+        isGRAPH
+        isPRINT
+        isPSXSPC
+        isPUNCT
+        isXDIGIT
+        PERL_PV_ESCAPE_ALL
+        PERL_PV_ESCAPE_FIRSTCHAR
+        PERL_PV_ESCAPE_NOBACKSLASH
+        PERL_PV_ESCAPE_NOCLEAR
+        PERL_PV_ESCAPE_QUOTE
+        PERL_PV_ESCAPE_RE
+        PERL_PV_ESCAPE_UNI
+        PERL_PV_ESCAPE_UNI_DETECT
+        PERL_PV_PRETTY_DUMP
+        PERL_PV_PRETTY_ELLIPSES
+        PERL_PV_PRETTY_LTGT
+        PERL_PV_PRETTY_NOCLEAR
+        PERL_PV_PRETTY_QUOTE
+        PERL_PV_PRETTY_REGPROP
+        pv_display
+        pv_escape
+        pv_pretty
+
+3.14_03 - 2008-10-21
+
+    * fix C++ compilation issue with last release
+      (spotted by Nicholas Clark)
+    * added support for the following API
+        Perl_ppaddr_t
+        Perl_check_t
+        CPERLscope
+      (fixes CPAN #40078)
+
+3.14_02 - 2008-10-12
+
+    * added support for the following API
+        my_sprintf
+        PL_linestr
+        PL_bufptr
+        PL_bufend
+        PL_lex_state
+        PL_lex_stuff
+        PL_tokenbuf
+        SvPV_renew
+      (fixes CPAN #39809 and CPAN #39808)
+    * add read/write support for
+        PL_expect
+        PL_copline
+        PL_rsfp
+        PL_rsfp_filters
+      (fixes CPAN #39802)
+    * sync my_snprintf implementation with bleadperl
+
+3.14_01 - 2008-07-11
+
+    * resolve CPAN #37451: add PERLIO_FUNCS_DECL and
+      PERLIO_FUNCS_CAST
+    * update API info
+
+3.14 - 2008-06-01
+
+    * fix CPAN #36197: filename nit in parse_partspec
+      (thanks to Craig A. Berry for providing a patch)
+
+3.13_03 - 2008-05-13
+
+    * fix CPAN #35835: SvPV_flags_const_nolen segfaults prior
+      to perl 5.8.8
+
+3.13_02 - 2008-04-13
+
+    * fix NV[efg]f format string macros for perl-5.6.0 built
+      using -Duselongdouble (thanks to Zefram for figuring this
+      out and to Jarkko Hietaniemi for keeping me in sync)
+    * add --patch and --oneshot options to devel/buildperl.pl
+
+3.13_01 - 2008-01-04
+
+    * fix dependency detection algorithm for functions
+    * fix some potential memory leaks in the test suite
+    * no need to use *_mg functions for mX?PUSH macros
+    * added support for the following API
+        mPUSHs
+        mXPUSHs
+        newSVpvn_flags
+        newSVpvn_utf8
+        newSVpvs_flags
+        SVf_UTF8
+    * make sure soak works with cromfs
+
+3.13 - 2007-10-04
+
+    * fix cpan #29748: ppport.h problems with perl5.005_05
+      (spotted by Slaven Rezić)
+    * fix a compiler warning
+
+3.12 - 2007-09-22
+
+    [released without changes]
+
+3.11_06 - 2007-09-11
+
+    * fix cpan #29302: Perl_croak_nocontext doesn't need aTHX_
+      (spotted by Jerry D. Hedden)
+    * fix a Win32 VC++ compiler warning (thanks to Steve Hay for
+      providing a patch)
+    * don't generate redundant specs for provided Perl_ functions
+    * fun with const and casts to avoid compiler warnings
+    * bump max supported version to 5.10.0
+
+3.11_05 - 2007-08-20
+
+    * fix: PERL_HASH() was emitting a warning when passed in a
+      const char pointer
+    * fix: sv_magic_portable() was emitting a warning when
+      passed in a const char pointer
+    * fix: make sure arguments to sv_magic_portable() are only
+      evaluated once
+
+3.11_04 - 2007-08-20
+
+    * fix: ignore strings and XS comments when scanning and
+      patching files
+    * added support for the following API
+        newSVpvn_share
+        PERL_HASH
+        SvSHARED_HASH
+    * use PERL_BCDREVISION for version checking to save some
+      bytes in ppport.h
+    * improve the --strip option
+      - strip all C comments
+      - strip most superfluous whitespace
+      with these changes, the stripped ppport.h is now almost
+      30% smaller:
+                       3.11_03   3.11_04     delta
+        ------------------------------------------
+        uncompressed     87988     62573    -28.9%
+        gzip'd           17985     12725    -29.2%
+
+3.11_03 - 2007-08-14
+
+    * fix an infinite recursion in ppport.h that could be
+      triggered by circular dependencies
+    * fix PERL_BCDREVISION, which wasn't BCD but simply
+      shifted decimal (just in time for 5.10)
+    * fix detection of macros that are not listed in the
+      implementation/dontwarn sections
+
+3.11_02 - 2007-08-13
+
+    * fix cpan #25372: special case sv_magic(sv, obj, how, name, 0)
+    * fix cpan #27906: [PATCH] add UTF8_MAXBYTES
+      (thanks to Steve Peters for providing a patch)
+    * added support for the following API
+        sv_2pv_flags
+        sv_2pvbyte_nolen
+        SV_CONST_RETURN
+        SV_COW_DROP_PV
+        SV_COW_SHARED_HASH_KEYS
+        SV_GMAGIC
+        SV_HAS_TRAILING_NUL
+        SV_IMMEDIATE_UNREF
+        sv_magic_portable
+        SV_MUTABLE_RETURN
+        SV_NOSTEAL
+        sv_pvn_force_flags
+        SV_SMAGIC
+        SV_UTF8_NO_ENCODING
+        SvPV_const
+        SvPV_flags
+        SvPV_flags_const
+        SvPV_flags_const_nolen
+        SvPV_flags_mutable
+        SvPV_force
+        SvPV_force_flags
+        SvPV_force_flags_mutable
+        SvPV_force_flags_nolen
+        SvPV_force_mutable
+        SvPV_force_nolen
+        SvPV_force_nomg_nolen
+        SvPV_mutable
+        SvPV_nolen_const
+        SvPV_nomg_const
+        SvPV_nomg_const_nolen
+        SvUOK
+        UTF8_MAXBYTES
+    * provide compatibility macros for vanished variables
+      PL_expect, PL_copline, PL_rsfp, PL_rsfp_filters
+    * add warnings support to ppport.h
+    * update ppport.h file searching logic
+    * add -c.inc and -xs.inc to the list of supported extensions
+    * document that --copy doesn't include the dot
+    * improve soak script and devel/buildperl.pl
+
+3.11_01 - 2007-03-23
+
+    * added support for the following API
+        PL_expect
+        load_module
+        vload_module
+      (thanks to Nicholas Clark for providing a patch)
+
+3.11 - 2007-02-14
+
+    * happy new year!
+
+3.10_02 - 2006-12-02
+
+    * add two missing files
+
+3.10_01 - 2006-12-02
+
+    * fix cpan #21239: Signals safe in Perl 5.8.0
+    * fix PL_ppaddr and PL_no_modify support 5.005 perls
+    * added dTHXR, aTHXR and aTHXR_ for API that need
+      the context argument in pre-5.6.0 perls
+    * added support for the following API
+        PL_DBsignal
+        PL_DBtrace
+        PL_laststatval
+        PL_statcache
+    * added tests for all PL_* variables
+    * added progress indicator to soak script
+    * added --test-archives option to buildperl.pl script
+    * added comments to all autogenerated files that
+      clearly indicate their purpose and origin
+
+3.10 - 2006-08-14
+
+    * remove timestamp from generated ppport.h
+
+3.09_02 - 2006-07-25
+
+    * added support for the following API
+        my_strlcat
+        my_strlcpy
+      (thanks to Steve Peters for providing a patch)
+
+3.09_01 - 2006-07-21
+
+    * avoid using 'glob' when running under miniperl
+
+3.09 - 2006-07-08
+
+    * fix Makefile.PL's c_o override
+    * update API info
+    * improve soak script
+      - now counts warnings emitted during testing
+      - output is colored (can be turned off)
+    * add a section on integrating this module into
+      the core to the HACKERS file
+
+3.08_07 - 2006-07-03
+
+    * fix cpan #20179: Licensing information for PPPort is
+      unclear
+    * only --unstrip a stripped ppport.h if an appropriate
+      version of Devel::PPPort is installed
+    * add a --version option to ppport.h
+
+3.08_06 - 2006-06-25
+
+    * fix breakage on MSWin32, where generating XS files on
+      the fly doesn't seem to work the same way as under Linux
+      (thanks to Sadahiro Tomoyuki for providing a patch)
+    * load the shared files only when testing the module
+    * remove PPPort.xs from CPAN distribution
+
+3.08_05 - 2006-06-23
+
+    * when in the core, generate PPPort.pm and PPPort.xs
+      automatically
+    * PPPort.pm can now be loaded by miniperl
+
+3.08_04 - 2006-05-29
+
+    * update API info
+    * fix a bug in the automated API info generator that
+      caused slightly wrong output
+    * improve the speed of the automated API info generator;
+      we're now down from several hours to a few minutes
+
+3.08_03 - 2006-05-25
+
+    * update API info
+    * add devel/regenerate script to regenerate API info
+    * improve and speed up the development tools
+
+3.08_02 - 2006-05-22
+
+    * fix a POD error
+    * added POD test
+    * changed hv_stores() to omit the hash parameter
+    * improve soak script
+      - can now search directories for perl executables
+      - can use only perl binaries of at least a certain
+        revision using the --min option
+      - sorts tests by perl version
+      - shows a summary of failed versions
+    * added support for the following API
+        PERL_USE_GCC_BRACE_GROUPS
+        PoisonFree
+        PoisonNew
+        PoisonWith
+        SvREFCNT_inc
+        SvREFCNT_inc_NN
+        SvREFCNT_inc_simple
+        SvREFCNT_inc_simple_NN
+        SvREFCNT_inc_simple_void
+        SvREFCNT_inc_simple_void_NN
+        SvREFCNT_inc_void
+        SvREFCNT_inc_void_NN
+
+3.08_01 - 2006-05-20
+
+    * update NOOP and dNOOP to include lint directives
+    * update API info (for 5.8.8 and 5.9.3)
+    * added support for the following API
+        ckWARN
+        dVAR
+        hv_fetchs
+        hv_stores
+        my_snprintf
+        newSVpvs
+        packWARN
+        PERL_ABS
+        PERL_UNUSED_ARG
+        PERL_UNUSED_CONTEXT
+        PERL_UNUSED_VAR
+        STR_WITH_LEN
+        sv_catpvs
+        sv_setpvs
+        SVf
+        SvVSTRING_mg
+        warner
+
+3.08 - 2006-01-19
+
+    * thanks to Craig Berry for fixing my broken ppphtest
+    * add AUTHOR and ABSTRACT_FROM to Makefile.PL
+
+3.07 - 2006-01-16
+
+    * improve internals documentation in HACKERS
+    * minor internal cleanups
+    * thanks to Steve Peters for adding support for
+      the following API
+        SvMAGIC_set
+        SvPVX_const
+        SvPVX_mutable
+        SvRV_set
+        SvSTASH_set
+        SvUV_set
+
+3.06_04 - 2005-10-30
+
+    * add --strip / --unstrip options
+    * added support for the following API
+        Newx
+        Newxc
+        Newxz
+        XSRETURN
+
+3.06_03 - 2005-10-18
+
+    * fix extra ')' in PPPort_pm.PL
+    * fix compiler warnings
+    * fix test for PL_signals
+    * fix API listing
+    * more tests
+
+3.06_02 - 2005-10-18
+
+    * improve devel/buildperl.pl utility
+    * added support for the following API
+        dAXMARK
+        PL_signals
+        PERL_SIGNALS_UNSAFE_FLAG
+        XSprePUSH
+
+3.06_01 - 2005-06-25
+
+    * fix --compat-version argument checking
+    * filter files passed on the command line by default
+      to make sure 'perl ppport.h *' does something useful
+    * add --nofilter option to override the filtering
+    * testsuite now hopefully supports MacOS Classic
+    * check definedness of PERL_UNUSED_DECL
+    * update API info
+
+3.06 - 2005-02-02
+
+    * fix cpan #11327: make fails with syntax error
+    * fix XCPT_* macros
+
+3.05 - 2005-01-31
+
+    * fix a test for SvPV_nolen
+    * add more examples to tht documentation
+    * improve wording baseline information
+    * added support for the following API
+        dXCPT
+        dXSTARG
+        XCPT_CATCH
+        XCPT_RETHROW
+        XCPT_TRY_END
+        XCPT_TRY_START
+
+3.04 - 2004-12-29
+
+    * fix a hint for sv_pvn_force
+    * fix VMS problem with unquoted command line arguments
+      not preserving case (perl change #23367)
+    * add --api-info switch for ppport.h
+
+3.03 - 2004-09-08
+
+    * MY_CXT_CLONE was broken
+
+3.02 - 2004-09-08
+
+    * added support for the following API:
+        END_EXTERN_C
+        EXTERN_C
+        MY_CXT_CLONE
+        PERL_GCC_BRACE_GROUPS_FORBIDDEN
+        START_EXTERN_C
+        STMT_END
+        STMT_START
+
+3.01 - 2004-08-23
+
+    * patchlevel.h tweak
+
+3.00_03 - 2004-08-20
+
+    * make sure the @INC path is kept up-to-date when changing
+      directories while running in the core test suite
+
+3.00_02 - 2004-08-19
+
+    * remove PPPort.pm and PPPort.xs dependencies from Makefile.PL,
+      as they can be rebuilt with a "make regen" when neccessary
+
+3.00_01 - 2004-08-17
+
+    * fixed problems with $^X in t/ppphtest.t when building in
+      the core on OpenBSD
+    * fixed a "duplicate dependencies" bug that could lead to
+      global NEED_'s where static NEED_'s are sufficient
+    * added support for the following API:
+        PL_DBsingle
+        PL_DBsub
+        PL_debstash
+        PL_diehook
+        PL_errgv
+        PL_no_modify
+        PL_perl_destruct_level
+        PL_ppaddr
+        PL_stack_sp
+        PL_sv_arenaroot
+        PL_tainted
+        PL_tainting
+        PUSHu
+        sv_catpvf_mg
+        sv_catpvf_mg_nocontext
+        sv_setpvf_mg
+        sv_setpvf_mg_nocontext
+        sv_vcatpvf
+        sv_vcatpvf_mg
+        sv_vsetpvf
+        sv_vsetpvf_mg
+        vnewSVpvf
+        XPUSHu
+
+3.00 - 2004-08-16
+
+    * added support for dAX and dITEMS, which got lost while
+      working on the 3.00 internals
+
+2.99_07 - 2004-08-13
+
+    * improve/check documentation
+    * add tests for CopFILE and CopSTASHPV
+    * add file headers
+    * some code cleanups
+
+2.99_06 - 2004-08-11
+
+    * --compat-version now considers all macros/functions
+      provided by Devel::PPPort, not only the documented API
+    * fixed: PL_rsfp was PL_rsfpv
+    * turn __PPPORT_NAME__ back to ppport.h, because the former
+      looks ugly on search.cpan.org
+
+2.99_05 - 2004-08-10
+
+    * --compat-version now also hides compatibility warnings for
+      unsupported API calls
+
+2.99_04 - 2004-08-10
+
+    * added code to check for correct INSTALLDIRS
+    * added --compat-version option to ppport.h script to only
+      check for compatibility with at least the given Perl version
+    * some small adjustments
+
+2.99_03 - 2004-08-09
+
+    * remove useless dependency from Makefile.PL (spotted by
+      Craig A. Berry)
+    * added checking for and replacement of C++ comments as
+      well as --cplusplus option to suppress it to ppport.h
+      script
+    * added more diagnostic output to ppport.h script
+    * added a hint for gv_stashpvn
+    * fixed the thread tests (spotted by Craig A. Berry)
+    * added more tests
+    * renamed and documented DPPP_NAMESPACE
+    * renamed some files
+
+2.99_02 - 2004-08-08
+
+    * second beta
+    * feature complete for 3.00
+    * implemented missing functionality for ppport.h script:
+      - can now perform global (i.e. multi-file) NEED_ checks
+      - checks source for missing aTHX arguments
+      - checks source for unsupported API calls
+      - can now lists provided and unsupported API
+      - can use Text::Diff on platforms without diff utility
+      - can use custom diff utility / options
+      - can write one patch against the module
+      - can write single copies with changes applied
+    * updated the documentation for Devel::PPPort and ppport.h
+    * added lots of tests for the ppport.h script
+    * merged tests for call_* eval_* from XS::APItest
+    * added HACKERS file to document internals
+    * now includes PPPort.pm, so you can read the full docs
+      using search.cpan.org
+
+2.99_01 - 2004-08-07
+
+    * first beta towards 3.00
+    * complete rework of internals
+    * autogenerated API-checks
+    * autogenerated .pm, .xs and .t files
+    * ppport.h changes:
+      - no static/global functions without explicit NEED_
+      - can now be run without -x
+      - now shows hints and dependencies
+      - now has POD documentation, so perldoc ppport.h works
+      - now has options
+      - now uses File::Find when available
+    * tested with multi-threaded (ithreads and 5.005-threads) perls
+      from 5.005 and single-threaded perls from 5.003 up to 5.9.x
+    * added support for the following API:
+        CopFILE
+        CopFILEAV
+        CopFILEGV
+        CopFILEGV_set
+        CopFILE_set
+        CopFILESV
+        CopSTASH
+        CopSTASH_eq
+        CopSTASHPV
+        CopSTASHPV_set
+        CopSTASH_set
+        CopyD
+        dUNDERBAR
+        IN_PERL_COMPILETIME
+        IV_MAX
+        IV_MIN
+        IVTYPE
+        memEQ
+        memNE
+        MoveD
+        mPUSHi
+        mPUSHn
+        mPUSHp
+        mPUSHu
+        mXPUSHi
+        mXPUSHn
+        mXPUSHp
+        mXPUSHu
+        newCONSTSUB
+        newSVuv
+        PERL_INT_MAX
+        PERL_INT_MIN
+        PERL_LONG_MAX
+        PERL_LONG_MIN
+        PERL_QUAD_MAX
+        PERL_QUAD_MIN
+        PERL_SHORT_MAX
+        PERL_SHORT_MIN
+        PERL_UCHAR_MAX
+        PERL_UCHAR_MIN
+        PERL_UINT_MAX
+        PERL_UINT_MIN
+        PERL_ULONG_MAX
+        PERL_ULONG_MIN
+        PERL_UQUAD_MAX
+        PERL_UQUAD_MIN
+        PERL_USHORT_MAX
+        PERL_USHORT_MIN
+        PL_hexdigit
+        PL_rsfp
+        Poison
+        PUSHmortal
+        sv_2pvbyte
+        sv_2pvbyte_nolen
+        sv_2pv_nolen
+        sv_2uv
+        sv_catpv_mg
+        sv_catpvn_mg
+        sv_catpvn_nomg
+        sv_catsv_mg
+        sv_catsv_nomg
+        SvGETMAGIC
+        SvIV_nomg
+        SvPV_force_nomg
+        sv_pvn
+        sv_pvn_force
+        sv_pvn_nomg
+        SvPV_nomg
+        sv_setiv_mg
+        sv_setnv_mg
+        sv_setpv_mg
+        sv_setpvn_mg
+        sv_setsv_mg
+        sv_setsv_nomg
+        sv_setuv
+        sv_setuv_mg
+        sv_usepvn_mg
+        sv_uv
+        SvUV
+        SvUV_nomg
+        SvUVx
+        SvUVX
+        SvUVXx
+        UNDERBAR
+        UV_MAX
+        UV_MIN
+        UVTYPE
+        XPUSHmortal
+        XSRETURN_UV
+        XST_mUV
+        ZeroD
+
+2.008 - 20th October 2003
+
+    * eval_(pv|sv) added
+    * PERL_MAGIC_* added
+
+2.007 - 18th September 2003
+
+    * small fix in grok_numeric_radix: variable was used uninitialized
+
+2.006 - 8th September 2003
+
+    * call_(pv|sv|method|argv) added
+    * still compiler-warnings for grok_??? and 5.6.x, fixed
+
+2.005 - 2nd September 2003
+
+    * Some tweaks to grok_(hex|oct|bin) to make compiler warnings
+      go away for older perls
+    * grok_number and grok_numeric_radix added
+
+2.004 - 22th August 2003
+
+    * Added grok_(hex|oct|bin) and related constants
+
+2.003 - 8th May 2003
+
+    * Added get_av, get_cv, get_hv and get_sv
+
+2.002 - 2nd December 2001
+
+    * More portability issues in Makefile.PL addresed.
+    * Merged the Harness sub-module into Devel::PPPort
+    * More documentation in PPPort.pm
+
+2.001
+
+    * Some portability issues in Makefile.PL addresed.
+
+2.000
+
+    * Initial port to the perl core.
+
+1.007
+
+    * Original version of the module by Kenneth Albanowski.
index c6918b9..c5fe0ed 100644 (file)
@@ -287,9 +287,9 @@ That's it.
 =head2 Submitting Patches
 
 If you've added some functionality to C<Devel::PPPort>, please
-consider submitting a patch with your work to either the author
-(E<lt>mhx@cpan.orgE<gt>) or to the CPAN Request Tracker at
-L<http://rt.cpan.org>.
+consider submitting a patch with your work to GitHub here:
+L<https://github.com/mhx/Devel-PPPort/issues/>, or by sending a
+Pull Request.
 
 When submitting patches, please only add the relevant changes
 and don't include the differences of the generated files. You
diff --git a/cpan/Devel-PPPort/MANIFEST b/cpan/Devel-PPPort/MANIFEST
new file mode 100644 (file)
index 0000000..3060057
--- /dev/null
@@ -0,0 +1,297 @@
+apicheck_c.PL
+Changes
+devel/buildperl.pl
+devel/devtools.pl
+devel/mkapidoc.sh
+devel/mktodo
+devel/mktodo.pl
+devel/regenerate
+devel/scanprov
+HACKERS
+Makefile.PL
+MANIFEST
+MANIFEST.SKIP
+mktests.PL
+module2.c
+module3.c
+parts/apicheck.pl
+parts/apidoc.fnc
+parts/base/5004000
+parts/base/5004010
+parts/base/5004020
+parts/base/5004030
+parts/base/5004040
+parts/base/5004050
+parts/base/5005000
+parts/base/5005010
+parts/base/5005020
+parts/base/5005030
+parts/base/5005040
+parts/base/5006000
+parts/base/5006001
+parts/base/5006002
+parts/base/5007000
+parts/base/5007001
+parts/base/5007002
+parts/base/5007003
+parts/base/5008000
+parts/base/5008001
+parts/base/5008002
+parts/base/5008003
+parts/base/5008004
+parts/base/5008005
+parts/base/5008006
+parts/base/5008007
+parts/base/5008008
+parts/base/5008009
+parts/base/5009000
+parts/base/5009001
+parts/base/5009002
+parts/base/5009003
+parts/base/5009004
+parts/base/5009005
+parts/base/5010000
+parts/base/5010001
+parts/base/5011000
+parts/base/5011001
+parts/base/5011002
+parts/base/5011003
+parts/base/5011004
+parts/base/5011005
+parts/base/5012000
+parts/base/5012001
+parts/base/5012002
+parts/base/5012003
+parts/base/5012004
+parts/base/5012005
+parts/base/5013000
+parts/base/5013001
+parts/base/5013002
+parts/base/5013003
+parts/base/5013004
+parts/base/5013005
+parts/base/5013006
+parts/base/5013007
+parts/base/5013008
+parts/base/5013009
+parts/base/5013010
+parts/base/5013011
+parts/base/5014000
+parts/base/5014001
+parts/base/5014002
+parts/base/5014003
+parts/base/5014004
+parts/base/5015000
+parts/base/5015001
+parts/base/5015002
+parts/base/5015003
+parts/base/5015004
+parts/base/5015005
+parts/base/5015006
+parts/base/5015007
+parts/base/5015008
+parts/base/5015009
+parts/base/5016000
+parts/base/5016001
+parts/base/5016002
+parts/base/5016003
+parts/base/5017000
+parts/base/5017001
+parts/base/5017002
+parts/base/5017003
+parts/base/5017004
+parts/base/5017005
+parts/base/5017006
+parts/base/5017007
+parts/base/5017008
+parts/base/5017009
+parts/base/5017010
+parts/base/5017011
+parts/base/5018000
+parts/base/5018001
+parts/base/5019000
+parts/base/5019001
+parts/base/5019002
+parts/base/5019003
+parts/embed.fnc
+parts/inc/call
+parts/inc/cop
+parts/inc/exception
+parts/inc/format
+parts/inc/grok
+parts/inc/gv
+parts/inc/HvNAME
+parts/inc/limits
+parts/inc/magic
+parts/inc/memory
+parts/inc/misc
+parts/inc/mPUSH
+parts/inc/MY_CXT
+parts/inc/newCONSTSUB
+parts/inc/newRV
+parts/inc/newSV_type
+parts/inc/newSVpv
+parts/inc/podtest
+parts/inc/ppphbin
+parts/inc/ppphdoc
+parts/inc/ppphtest
+parts/inc/pv_tools
+parts/inc/pvs
+parts/inc/shared_pv
+parts/inc/snprintf
+parts/inc/sprintf
+parts/inc/strlfuncs
+parts/inc/Sv_set
+parts/inc/sv_xpvf
+parts/inc/SvPV
+parts/inc/SvREFCNT
+parts/inc/threads
+parts/inc/uv
+parts/inc/variables
+parts/inc/version
+parts/inc/warn
+parts/ppport.fnc
+parts/ppptools.pl
+parts/todo/5004000
+parts/todo/5004010
+parts/todo/5004020
+parts/todo/5004030
+parts/todo/5004040
+parts/todo/5004050
+parts/todo/5005000
+parts/todo/5005010
+parts/todo/5005020
+parts/todo/5005030
+parts/todo/5005040
+parts/todo/5006000
+parts/todo/5006001
+parts/todo/5006002
+parts/todo/5007000
+parts/todo/5007001
+parts/todo/5007002
+parts/todo/5007003
+parts/todo/5008000
+parts/todo/5008001
+parts/todo/5008002
+parts/todo/5008003
+parts/todo/5008004
+parts/todo/5008005
+parts/todo/5008006
+parts/todo/5008007
+parts/todo/5008008
+parts/todo/5008009
+parts/todo/5009000
+parts/todo/5009001
+parts/todo/5009002
+parts/todo/5009003
+parts/todo/5009004
+parts/todo/5009005
+parts/todo/5010000
+parts/todo/5010001
+parts/todo/5011000
+parts/todo/5011001
+parts/todo/5011002
+parts/todo/5011003
+parts/todo/5011004
+parts/todo/5011005
+parts/todo/5012000
+parts/todo/5012001
+parts/todo/5012002
+parts/todo/5012003
+parts/todo/5012004
+parts/todo/5012005
+parts/todo/5013000
+parts/todo/5013001
+parts/todo/5013002
+parts/todo/5013003
+parts/todo/5013004
+parts/todo/5013005
+parts/todo/5013006
+parts/todo/5013007
+parts/todo/5013008
+parts/todo/5013009
+parts/todo/5013010
+parts/todo/5013011
+parts/todo/5014000
+parts/todo/5014001
+parts/todo/5014002
+parts/todo/5014003
+parts/todo/5014004
+parts/todo/5015000
+parts/todo/5015001
+parts/todo/5015002
+parts/todo/5015003
+parts/todo/5015004
+parts/todo/5015005
+parts/todo/5015006
+parts/todo/5015007
+parts/todo/5015008
+parts/todo/5015009
+parts/todo/5016000
+parts/todo/5016001
+parts/todo/5016002
+parts/todo/5016003
+parts/todo/5017000
+parts/todo/5017001
+parts/todo/5017002
+parts/todo/5017003
+parts/todo/5017004
+parts/todo/5017005
+parts/todo/5017006
+parts/todo/5017007
+parts/todo/5017008
+parts/todo/5017009
+parts/todo/5017010
+parts/todo/5017011
+parts/todo/5018000
+parts/todo/5018001
+parts/todo/5019000
+parts/todo/5019001
+parts/todo/5019002
+parts/todo/5019003
+PPPort.pm
+PPPort.xs
+ppport_h.PL
+PPPort_pm.PL
+PPPort_xs.PL
+README
+README.md
+soak
+t/call.t
+t/cop.t
+t/exception.t
+t/format.t
+t/grok.t
+t/gv.t
+t/HvNAME.t
+t/limits.t
+t/magic.t
+t/memory.t
+t/misc.t
+t/mPUSH.t
+t/MY_CXT.t
+t/newCONSTSUB.t
+t/newRV.t
+t/newSV_type.t
+t/newSVpv.t
+t/podtest.t
+t/ppphtest.t
+t/pv_tools.t
+t/pvs.t
+t/shared_pv.t
+t/snprintf.t
+t/sprintf.t
+t/strlfuncs.t
+t/Sv_set.t
+t/sv_xpvf.t
+t/SvPV.t
+t/SvREFCNT.t
+t/testutil.pl
+t/threads.t
+t/uv.t
+t/variables.t
+t/warn.t
+TODO
+typemap
+META.yml                                 Module YAML meta-data (added by MakeMaker)
+META.json                                Module JSON meta-data (added by MakeMaker)
diff --git a/cpan/Devel-PPPort/MANIFEST.SKIP b/cpan/Devel-PPPort/MANIFEST.SKIP
new file mode 100644 (file)
index 0000000..c4fa267
--- /dev/null
@@ -0,0 +1,20 @@
+^\.git
+^MYMETA.*$
+^Makefile$
+~$
+\.old(?:\..*)?$
+\.swp$
+\.o$
+\.bs$
+\.bak$
+\.orig$
+\.cache\.cm$
+^blib
+^pm_to_blib
+^backup
+^parts/todo-
+^parts/base-
+^ppport\.h$
+^PPPort\.c$
+^testing
+Devel-PPPort.*\.tar\.gz$
diff --git a/cpan/Devel-PPPort/META.json b/cpan/Devel-PPPort/META.json
new file mode 100644 (file)
index 0000000..06b3607
--- /dev/null
@@ -0,0 +1,46 @@
+{
+   "abstract" : "Perl/Pollution/Portability",
+   "author" : [
+      "Marcus Holland-Moritz <mhx@cpan.org>"
+   ],
+   "dynamic_config" : 1,
+   "generated_by" : "ExtUtils::MakeMaker version 6.86, CPAN::Meta::Converter version 2.140640",
+   "license" : [
+      "perl_5"
+   ],
+   "meta-spec" : {
+      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+      "version" : "2"
+   },
+   "name" : "Devel-PPPort",
+   "no_index" : {
+      "directory" : [
+         "t",
+         "inc"
+      ]
+   },
+   "prereqs" : {
+      "build" : {
+         "requires" : {
+            "ExtUtils::MakeMaker" : "0"
+         }
+      },
+      "configure" : {
+         "requires" : {
+            "ExtUtils::MakeMaker" : "0"
+         }
+      }
+   },
+   "release_status" : "stable",
+   "resources" : {
+      "bugtracker" : {
+         "web" : "https://github.com/mhx/Devel-PPPort/issues/"
+      },
+      "repository" : {
+         "type" : "git",
+         "url" : "git://github.com/mhx/Devel-PPPort.git",
+         "web" : "https://github.com/mhx/Devel-PPPort/"
+      }
+   },
+   "version" : "3.24"
+}
diff --git a/cpan/Devel-PPPort/META.yml b/cpan/Devel-PPPort/META.yml
new file mode 100644 (file)
index 0000000..07da3fd
--- /dev/null
@@ -0,0 +1,23 @@
+---
+abstract: Perl/Pollution/Portability
+author:
+  - 'Marcus Holland-Moritz <mhx@cpan.org>'
+build_requires:
+  ExtUtils::MakeMaker: '0'
+configure_requires:
+  ExtUtils::MakeMaker: '0'
+dynamic_config: 1
+generated_by: 'ExtUtils::MakeMaker version 6.86, CPAN::Meta::Converter version 2.140640'
+license: perl
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: '1.4'
+name: Devel-PPPort
+no_index:
+  directory:
+    - t
+    - inc
+resources:
+  bugtracker: https://github.com/mhx/Devel-PPPort/issues/
+  repository: git://github.com/mhx/Devel-PPPort.git
+version: '3.24'
index 2353324..25e352e 100644 (file)
@@ -34,6 +34,21 @@ WriteMakefile(
   OBJECT        => 'RealPPPort$(OBJ_EXT) $(O_FILES)',
   XSPROTOARG    => '-noprototypes',
   CONFIGURE     => \&configure,
+  META_MERGE    => {
+    'meta-spec' => {
+      version => 2,
+    },
+    resources => {
+      bugtracker => {
+        web => 'https://github.com/mhx/Devel-PPPort/issues/',
+      },
+      repository => {
+        type => 'git',
+        url  => 'git://github.com/mhx/Devel-PPPort.git',
+        web  => 'https://github.com/mhx/Devel-PPPort/',
+      },
+    },
+  },
 );
 
 sub configure
index 23ffb6b..a73336c 100644 (file)
@@ -120,7 +120,7 @@ $data =~ s{^__UNSUPPORTED_API__(\s*?)^}
           {join "\n", @todo}gem;
 
 $data =~ s{__MIN_PERL__}{5.003}g;
-$data =~ s{__MAX_PERL__}{5.11.5}g;
+$data =~ s{__MAX_PERL__}{5.20}g;
 
 open FH, ">PPPort.pm" or die "PPPort.pm: $!\n";
 print FH $data;
@@ -384,6 +384,10 @@ Devel::PPPort - Perl/Pollution/Portability
     Devel::PPPort::WriteFile();   # defaults to ./ppport.h
     Devel::PPPort::WriteFile('someheader.h');
 
+    # Same as above but retrieve contents rather than write file
+    my $contents = Devel::PPPort::GetFileContents();
+    my $contents = Devel::PPPort::GetFileContents('someheader.h');
+
 =head1 DESCRIPTION
 
 Perl's API has changed over time, gaining new features, new functions,
@@ -393,12 +397,15 @@ typically F<ppport.h>, attempts to bring some of the newer Perl API
 features to older versions of Perl, so that you can worry less about
 keeping track of old releases, but users can still reap the benefit.
 
-C<Devel::PPPort> contains a single function, called C<WriteFile>. Its
-only purpose is to write the F<ppport.h> C header file. This file
-contains a series of macros and, if explicitly requested, functions that
-allow XS modules to be built using older versions of Perl. Currently,
+C<Devel::PPPort> contains two functions, C<WriteFile> and C<GetFileContents>.
+C<WriteFile>'s only purpose is to write the F<ppport.h> C header file.
+This file contains a series of macros and, if explicitly requested, functions
+that allow XS modules to be built using older versions of Perl. Currently,
 Perl versions from __MIN_PERL__ to __MAX_PERL__ are supported.
 
+C<GetFileContents> can be used to retrieve the file contents rather than
+writing it out.
+
 This module is used by C<h2xs> to write the file F<ppport.h>.
 
 =head2 Why use ppport.h?
@@ -449,6 +456,11 @@ no arguments, it defaults to the filename F<ppport.h>.
 The function returns a true value if the file was written successfully.
 Otherwise it returns a false value.
 
+=head2 GetFileContents
+
+C<GetFileContents> behaves like C<WriteFile> above, but returns the contents
+of the would-be file rather than writing it out.
+
 =head1 COMPATIBILITY
 
 F<ppport.h> supports Perl versions from __MIN_PERL__ to __MAX_PERL__
@@ -480,8 +492,8 @@ __UNSUPPORTED_API__
 =head1 BUGS
 
 If you find any bugs, C<Devel::PPPort> doesn't seem to build on your
-system or any of its tests fail, please use the CPAN Request Tracker
-at L<http://rt.cpan.org/> to create a ticket for the module.
+system, or any of its tests fail, please file an issue here:
+L<https://github.com/mhx/Devel-PPPort/issues/>
 
 =head1 AUTHORS
 
@@ -499,6 +511,10 @@ Version 2.x was ported to the Perl core by Paul Marquess.
 
 Version 3.x was ported back to CPAN by Marcus Holland-Moritz.
 
+=item * 
+
+Versions >= 3.22 are maintained with support from Matthew Horsfall (alh).
+
 =back
 
 =head1 COPYRIGHT
@@ -523,7 +539,7 @@ package Devel::PPPort;
 use strict;
 use vars qw($VERSION $data);
 
-$VERSION = '3.21';
+$VERSION = '3.24';
 
 sub _init_data
 {
@@ -535,15 +551,21 @@ sub _init_data
   $data =~ s/^\|>//gm;
 }
 
-sub WriteFile
-{
+sub GetFileContents {
   my $file = shift || 'ppport.h';
   defined $data or _init_data();
   my $copy = $data;
   $copy =~ s/\bppport\.h\b/$file/g;
 
+  return $copy;
+}
+
+sub WriteFile
+{
+  my $file = shift || 'ppport.h';
+  my $data = GetFileContents($file);
   open F, ">$file" or return undef;
-  print F $copy;
+  print F $data;
   close F;
 
   return 1;
diff --git a/cpan/Devel-PPPort/README b/cpan/Devel-PPPort/README
new file mode 100644 (file)
index 0000000..97bd54d
--- /dev/null
@@ -0,0 +1,77 @@
+
+        ------------------------------------------------------
+         Devel::PPPort - Perl/Pollution/Portability Version 3
+        ------------------------------------------------------
+
+CONTENTS
+
+1. DESCRIPTION
+2. INSTALLATION
+3. DOCUMENTATION
+4. BUGS
+5. COPYRIGHT
+
+
+--------------
+1. DESCRIPTION
+--------------
+
+Perl's API has changed over time, gaining new features, new functions,
+increasing its flexibility, and reducing the impact on the C namespace
+environment (reduced pollution). The header file written by this module,
+typically F<ppport.h>, attempts to bring some of the newer Perl API
+features to older versions of Perl, so that you can worry less about
+keeping track of old releases, but users can still reap the benefit.
+
+---------------
+2. INSTALLATION
+---------------
+
+Installation of the Devel::PPPort module follows the standard Perl Way
+and should not be harder than:
+
+  perl Makefile.PL
+  make
+  make test
+  make install
+
+Note that you may need to become superuser to 'make install'.
+
+If you're building the module under Windows, you may need to use a
+different make program, such as 'nmake', instead of 'make'.
+
+----------------
+3. DOCUMENTATION
+----------------
+
+To see the documentation, use the perldoc command:
+
+  perldoc Devel::PPPort
+
+You can also visit CPAN Search and see the documentation online as
+pretty nice HTML. This is also where you will find the most recent
+version of this module:
+
+  http://search.cpan.org/~mhx/Devel-PPPort/
+
+-------
+4. BUGS
+-------
+
+If you find any bugs, Devel::PPPort doesn't seem to build on your
+system, or any of its tests fail, please file an issue here:
+
+  https://github.com/mhx/Devel-PPPort/issues/
+
+to create a ticket for the module.
+
+------------
+5. COPYRIGHT
+------------
+
+Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+Version 2.x, Copyright (C) 2001, Paul Marquess.
+Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+
+This program is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
diff --git a/cpan/Devel-PPPort/README.md b/cpan/Devel-PPPort/README.md
new file mode 100644 (file)
index 0000000..318f7cf
--- /dev/null
@@ -0,0 +1,4 @@
+Devel-PPPort
+============
+
+Perl/Pollution/Portability
diff --git a/cpan/Devel-PPPort/TODO b/cpan/Devel-PPPort/TODO
new file mode 100644 (file)
index 0000000..a54a8c3
--- /dev/null
@@ -0,0 +1,346 @@
+TODO:
+
+* > 3. In several cases, "perl ppport.h --copy=.new" output a new file in
+  > which the only change was the addition of "#include "ppport.h"". In each
+  > case, that actually wasn't necessary because the source file in question
+  > already #included another source file which #included ppport.h itself.
+  > Would it be possible for the analyzer to follow #include directives to
+  > spot cases like this?
+
+  Uh, well, I guess it would be possible. But I have some concerns:
+
+  1. ppport.h is already too big. :-)
+
+  2. There is code in ppport.h to actually remove an
+
+       #include "ppport.h"
+
+     if it appears not to be needed. If it's not needed in your
+     included file, it might be dropped from there and moved to
+     the other file that included the first one. This would make
+     the logic much more complicated.
+
+  3. As ppport.h is configurable, it's not (always) a good idea
+     to put it into a file that's included from another file.
+
+  I guess I'll have to think about this a little more. Maybe I can
+  come up with a fancy solution that doesn't increase the code size
+  too much.
+
+
+* On 14/12/06, Nicholas Clark <nick@ccl4.org> wrote:
+  > On Thu, Dec 14, 2006 at 05:03:24AM +0100, Andreas J. Koenig wrote:
+  >
+  > > Params::Validate and Clone suffer from the same cold:
+  >
+  > The same patch will make both compile and pass tests.
+  > I'm wondering if it might be better to totally drop SVt_PBVM and let source
+  > code fail to compile.
+
+  I don't think so. Because :
+  1. your redefinition of SVt_PBVM is probably what most XS modules want
+  2. anyway, if we remove it from the core, it might appear in Devel::PPPort :)
+
+
+* maybe backport bytes_from_utf8() for 5.6.0 (or even before)?
+
+* check which of the following we need to support:
+
+    amagic_generation
+    AMG_names
+    an
+    Argv
+    argvgv
+    argvoutgv
+    basetime
+    beginav
+    block_type
+    bodytarget
+    bufend
+    bufptr
+    check
+    chopset
+    Cmd
+    compcv
+    compiling
+    comppad
+    comppad_name
+    comppad_name_fill
+    copline
+    cop_seqmax
+    cryptseen
+    cshlen
+    cshname
+    curcop
+    curinterp
+    curpad
+    curpm
+    curstash
+    curstname
+    dbargs
+    DBgv
+    DBline
+    DBsignal
+    DBsingle
+    DBsub
+    DBtrace
+    debstash
+    debug
+    defgv
+    defoutgv
+    defstash
+    delaymagic
+    diehook
+    dirty
+    doextract
+    doswitches
+    do_undump
+    dowarn
+    egid
+    encoding
+    endav
+    envgv
+    errgv
+    error_count
+    errors
+    euid
+    eval_root
+    evalseq
+    eval_start
+    expect
+    fdpid
+    filemode
+    firstgv
+    fold
+    forkprocess
+    formfeed
+    formtarget
+    freq
+    generation
+    gensym
+    gid
+    hexdigit
+    hints
+    incgv
+    in_eval
+    in_my
+    inplace
+    lastfd
+    last_in_gv
+    last_lop
+    last_lop_op
+    lastscream
+    laststatval
+    laststype
+    last_uni
+    lex_brackets
+    lex_brackstack
+    lex_casemods
+    lex_casestack
+    lex_defer
+    lex_dojoin
+    lex_expect
+    lex_formbrack
+    lex_inpat
+    lex_inwhat
+    lex_op
+    lex_repl
+    lex_starts
+    lex_state
+    lex_stuff
+    lineary
+    linestr
+    localizing
+    main_cv
+    main_root
+    mainstack
+    main_start
+    markstack
+    markstack_max
+    markstack_ptr
+    max_intro_pending
+    maxo
+    maxscream
+    maxsysfd
+    min_intro_pending
+    minus_a
+    minus_c
+    minus_F
+    minus_l
+    minus_n
+    minus_p
+    multi_close
+    multi_end
+    multi_open
+    multi_start
+    na
+    nexttoke
+    nexttype
+    nextval
+    nice_chunk
+    nice_chunk_size
+    No
+    no_aelem
+    no_dir_func
+    no_func
+    no_mem
+    nomemok
+    no_modify
+    no_myglob
+    no_security
+    no_sock_func
+    no_symref
+    no_usym
+    no_wrongref
+    nrs
+    oldbufptr
+    oldname
+    oldoldbufptr
+    op
+    opargs
+    op_desc
+    op_mask
+    op_name
+    op_seq
+    origalen
+    origargc
+    origargv
+    origenviron
+    origfilename
+    osname
+    padix
+    padix_floor
+    pad_reset_pending
+    patchlevel
+    patleave
+    perldb
+    perl_destruct_level
+    pidstatus
+    ppaddr
+    preambleav
+    preambled
+    preprocess
+    profiledata
+    regdummy
+    regendp
+    regeol
+    reginput
+    regkind
+    reglastparen
+    regsize
+    regstartp
+    restartop
+    rs
+    rsfp
+    rsfp_filters
+    runops
+    savestack
+    savestack_ix
+    savestack_max
+    sawampersand
+    scopestack
+    scopestack_ix
+    scopestack_max
+    screamfirst
+    screamnext
+    secondgv
+    signals
+    sig_name
+    sig_num
+    simple
+    sortcop
+    sortstash
+    splitstr
+    stack_base
+    stack_max
+    stack_sp
+    statbuf
+    statcache
+    statgv
+    statname
+    statusvalue
+    stdingv
+    sub_generation
+    subline
+    subname
+    Sv
+    sv_arenaroot
+    sv_count
+    sv_no
+    sv_objcount
+    sv_root
+    sv_undef
+    sv_yes
+    tainted
+    tainting
+    timesbuf
+    tmps_floor
+    tmps_ix
+    tmps_max
+    tmps_stack
+    tokenbuf
+    top_env
+    toptarget
+    uid
+    unsafe
+    varies
+    vtbl_amagic
+    vtbl_amagicelem
+    vtbl_arylen
+    vtbl_bm
+    vtbl_dbline
+    vtbl_env
+    vtbl_envelem
+    vtbl_glob
+    vtbl_isa
+    vtbl_isaelem
+    vtbl_mglob
+    vtbl_pack
+    vtbl_packelem
+    vtbl_pos
+    vtbl_sig
+    vtbl_sigelem
+    vtbl_substr
+    vtbl_sv
+    vtbl_taint
+    vtbl_uvar
+    vtbl_vec
+    warnhook
+    warn_nl
+    warn_nosemi
+    warn_reserved
+    warn_uninit
+    watchaddr
+    watchok
+    Xpv
+    Yes
+
+* have an --env option for soak to set env variable combinations
+
+* only overwrite generated files if they actually changed
+
+* try to make parts/apicheck.pl automatically find NEED_ #defines
+
+* add support for my_vsnprintf?
+
+* try to perform some core consistency checks:
+
+  - check if 'd' flag in embed.fnc matches with
+    supplied documentation
+
+  - check if all public API is documented
+
+* check (during make regen?) if MAX_PERL in PPPort_pm.PL
+  needs to be updated
+
+* see if we can implement sv_catpvf() for < 5.004
+
+* MULTICALL ?
+
+* improve apicheck (things like utf8_mg_pos_init() are
+  not currently checked)
+
+* more documentation, more tests
+
+* Resolve dependencies in Makefile.PL and remind of
+  running 'make regen'
index e11187f..bea9bac 100644 (file)
@@ -146,6 +146,7 @@ print OUT <<HEAD;
 #define NEED_load_module
 #define NEED_my_snprintf
 #define NEED_my_sprintf
+#define NEED_mg_findext
 #define NEED_my_strlcat
 #define NEED_my_strlcpy
 #define NEED_newCONSTSUB
index 6ccd9e7..7d8e4d3 100644 (file)
@@ -124,6 +124,9 @@ vload_module(U32 flags, SV *name, SV *ver, va_list *args)
 #if { VERSION >= 5.004 }
         utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(FALSE, 0),
                 veop, modname, imop);
+#elif { VERSION > 5.003 }
+        utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(),
+                veop, modname, imop);
 #else
         utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(),
                 modname, imop);
index d7219fd..9ca6627 100644 (file)
@@ -569,7 +569,7 @@ grok_bin(string)
         SV *string
         PREINIT:
                 char *pv;
-                I32 flags;
+                I32 flags = 0;
                 STRLEN len;
         CODE:
                 pv = SvPV(string, len);
@@ -582,7 +582,7 @@ grok_hex(string)
         SV *string
         PREINIT:
                 char *pv;
-                I32 flags;
+                I32 flags = 0;
                 STRLEN len;
         CODE:
                 pv = SvPV(string, len);
@@ -595,7 +595,7 @@ grok_oct(string)
         SV *string
         PREINIT:
                 char *pv;
-                I32 flags;
+                I32 flags = 0;
                 STRLEN len;
         CODE:
                 pv = SvPV(string, len);
@@ -621,7 +621,7 @@ Perl_grok_bin(string)
         SV *string
         PREINIT:
                 char *pv;
-                I32 flags;
+                I32 flags = 0;
                 STRLEN len;
         CODE:
                 pv = SvPV(string, len);
@@ -634,7 +634,7 @@ Perl_grok_hex(string)
         SV *string
         PREINIT:
                 char *pv;
-                I32 flags;
+                I32 flags = 0;
                 STRLEN len;
         CODE:
                 pv = SvPV(string, len);
@@ -647,7 +647,7 @@ Perl_grok_oct(string)
         SV *string
         PREINIT:
                 char *pv;
-                I32 flags;
+                I32 flags = 0;
                 STRLEN len;
         CODE:
                 pv = SvPV(string, len);
index 59cd40b..136758d 100644 (file)
 
 =provides
 
+mg_findext
+sv_unmagicext
+
 __UNDEFINED__
 /sv_\w+_mg/
 sv_magic_portable
+MUTABLE_PTR
+MUTABLE_SV
 
 =implementation
 
 __UNDEFINED__  SvGETMAGIC(x) STMT_START { if (SvGMAGICAL(x)) mg_get(x); } STMT_END
 
+/* Some random bits for sv_unmagicext. These should probably be pulled in for
+   real and organized at some point */
+
+__UNDEFINED__  HEf_SVKEY   -2
+
+#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
+#  define MUTABLE_PTR(p) ({ void *_p = (p); _p; })
+#else
+#  define MUTABLE_PTR(p) ((void *) (p))
+#endif
+
+#define MUTABLE_SV(p)   ((SV *)MUTABLE_PTR(p))
+
+/* end of random bits */
+
 __UNDEFINED__  PERL_MAGIC_sv              '\0'
 __UNDEFINED__  PERL_MAGIC_overload        'A'
 __UNDEFINED__  PERL_MAGIC_overload_elem   'a'
@@ -200,8 +220,205 @@ __UNDEFINED__  SvVSTRING_mg(sv)  (SvMAGICAL(sv) ? mg_find(sv, PERL_MAGIC_vstring
 
 #endif
 
+#if !defined(mg_findext)
+#if { NEED mg_findext }
+
+MAGIC *
+mg_findext(pTHX_ SV * sv, int type, const MGVTBL *vtbl) {
+    if (sv) {
+        MAGIC *mg;
+
+#ifdef AvPAD_NAMELIST
+       assert(!(SvTYPE(sv) == SVt_PVAV && AvPAD_NAMELIST(sv)));
+#endif
+
+        for (mg = SvMAGIC (sv); mg; mg = mg->mg_moremagic) {
+            if (mg->mg_type == type && mg->mg_virtual == vtbl)
+                return mg;
+        }
+    }
+
+    return NULL;
+}
+
+#endif
+#endif
+
+#if !defined(sv_unmagicext)
+#if { NEED sv_unmagicext }
+
+int
+sv_unmagicext(pTHX_ SV *const sv, const int type, MGVTBL *vtbl)
+{
+    MAGIC* mg;
+    MAGIC** mgp;
+
+    if (SvTYPE(sv) < SVt_PVMG || !SvMAGIC(sv))
+       return 0;
+    mgp = &(SvMAGIC(sv));
+    for (mg = *mgp; mg; mg = *mgp) {
+       const MGVTBL* const virt = mg->mg_virtual;
+       if (mg->mg_type == type && virt == vtbl) {
+           *mgp = mg->mg_moremagic;
+           if (virt && virt->svt_free)
+               virt->svt_free(aTHX_ sv, mg);
+           if (mg->mg_ptr && mg->mg_type != PERL_MAGIC_regex_global) {
+               if (mg->mg_len > 0)
+                   Safefree(mg->mg_ptr);
+               else if (mg->mg_len == HEf_SVKEY) /* Questionable on older perls... */
+                   SvREFCNT_dec(MUTABLE_SV(mg->mg_ptr));
+               else if (mg->mg_type == PERL_MAGIC_utf8)
+                   Safefree(mg->mg_ptr);
+            }
+           if (mg->mg_flags & MGf_REFCOUNTED)
+               SvREFCNT_dec(mg->mg_obj);
+           Safefree(mg);
+       }
+       else
+           mgp = &mg->mg_moremagic;
+    }
+    if (SvMAGIC(sv)) {
+       if (SvMAGICAL(sv))      /* if we're under save_magic, wait for restore_magic; */
+           mg_magical(sv);     /*    else fix the flags now */
+    }
+    else {
+       SvMAGICAL_off(sv);
+       SvFLAGS(sv) |= (SvFLAGS(sv) & (SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT;
+    }
+    return 0;
+}
+
+#endif
+#endif
+
+=xsinit
+
+#define NEED_mg_findext
+#define NEED_sv_unmagicext
+
+#ifndef STATIC
+#define STATIC static
+#endif
+
+STATIC MGVTBL null_mg_vtbl = {
+    NULL, /* get */
+    NULL, /* set */
+    NULL, /* len */
+    NULL, /* clear */
+    NULL, /* free */
+#if MGf_COPY
+    NULL, /* copy */
+#endif /* MGf_COPY */
+#if MGf_DUP
+    NULL, /* dup */
+#endif /* MGf_DUP */
+#if MGf_LOCAL
+    NULL, /* local */
+#endif /* MGf_LOCAL */
+};
+
+STATIC MGVTBL other_mg_vtbl = {
+    NULL, /* get */
+    NULL, /* set */
+    NULL, /* len */
+    NULL, /* clear */
+    NULL, /* free */
+#if MGf_COPY
+    NULL, /* copy */
+#endif /* MGf_COPY */
+#if MGf_DUP
+    NULL, /* dup */
+#endif /* MGf_DUP */
+#if MGf_LOCAL
+    NULL, /* local */
+#endif /* MGf_LOCAL */
+};
+
 =xsubs
 
+SV *
+new_with_other_mg(package, ...)
+    SV *package
+  PREINIT:
+    HV *self;
+    HV *stash;
+    SV *self_ref;
+    int i = 0;
+    const char *data = "hello\0";
+    MAGIC *mg;
+  CODE:
+    self = newHV();
+    stash = gv_stashpv(SvPV_nolen(package), 0);
+
+    self_ref = newRV_noinc((SV*)self);
+
+    sv_magic((SV*)self, NULL, PERL_MAGIC_ext, data, strlen(data));
+    mg = mg_find((SV*)self, PERL_MAGIC_ext);
+    mg->mg_virtual = &other_mg_vtbl;
+
+    RETVAL = sv_bless(self_ref, stash);
+  OUTPUT:
+    RETVAL
+
+SV *
+new_with_mg(package, ...)
+    SV *package
+  PREINIT:
+    HV *self;
+    HV *stash;
+    SV *self_ref;
+    int i = 0;
+    const char *data = "hello\0";
+    MAGIC *mg;
+  CODE:
+    self = newHV();
+    stash = gv_stashpv(SvPV_nolen(package), 0);
+
+    self_ref = newRV_noinc((SV*)self);
+
+    sv_magic((SV*)self, NULL, PERL_MAGIC_ext, data, strlen(data));
+    mg = mg_find((SV*)self, PERL_MAGIC_ext);
+    mg->mg_virtual = &null_mg_vtbl;
+
+    RETVAL = sv_bless(self_ref, stash);
+  OUTPUT:
+    RETVAL
+
+void
+remove_null_magic(self)
+    SV *self
+  PREINIT:
+    HV *obj;
+  PPCODE:
+    obj = (HV*) SvRV(self);
+
+    sv_unmagicext((SV*)obj, PERL_MAGIC_ext, &null_mg_vtbl);
+
+void
+remove_other_magic(self)
+    SV *self
+  PREINIT:
+    HV *obj;
+  PPCODE:
+    obj = (HV*) SvRV(self);
+
+    sv_unmagicext((SV*)obj, PERL_MAGIC_ext, &other_mg_vtbl);
+
+void
+as_string(self)
+    SV *self
+  PREINIT:
+    HV *obj;
+    MAGIC *mg;
+  PPCODE:
+    obj = (HV*) SvRV(self);
+
+    if ((mg = mg_findext((SV*)obj, PERL_MAGIC_ext, &null_mg_vtbl))) {
+        XPUSHs(sv_2mortal(newSVpv(mg->mg_ptr, strlen(mg->mg_ptr))));
+    } else {
+       XPUSHs(sv_2mortal(newSVpvs("Sorry, your princess is in another castle.")));
+    }
+
 void
 sv_catpv_mg(sv, string)
         SV *sv;
@@ -314,7 +531,31 @@ sv_magic_portable(sv)
         OUTPUT:
                 RETVAL
 
-=tests plan => 15
+=tests plan => 23
+
+# Find proper magic
+ok(my $obj1 = Devel::PPPort->new_with_mg());
+ok(Devel::PPPort::as_string($obj1), 'hello');
+
+# Find with no magic
+my $obj = bless {}, 'Fake::Class';
+ok(Devel::PPPort::as_string($obj), "Sorry, your princess is in another castle.");
+
+# Find with other magic (not the magic we are looking for)
+ok($obj = Devel::PPPort->new_with_other_mg());
+ok(Devel::PPPort::as_string($obj), "Sorry, your princess is in another castle.");
+
+# Okay, attempt to remove magic that isn't there
+Devel::PPPort::remove_other_magic($obj1);
+ok(Devel::PPPort::as_string($obj1), 'hello');
+
+# Remove magic that IS there
+Devel::PPPort::remove_null_magic($obj1);
+ok(Devel::PPPort::as_string($obj1), "Sorry, your princess is in another castle.");
+
+# Removing when no magic present
+Devel::PPPort::remove_null_magic($obj1);
+ok(Devel::PPPort::as_string($obj1), "Sorry, your princess is in another castle.");
 
 use Tie::Hash;
 my %h;
index dcc615e..8b698ac 100644 (file)
@@ -37,6 +37,7 @@ STMT_END
 UTF8_MAXBYTES
 WIDEST_UTYPE
 XSRETURN
+HeUTF8
 
 =implementation
 
@@ -285,6 +286,15 @@ __UNDEFINED__ isPUNCT(c)        (((c) >= 33 && (c) <= 47) || ((c) >= 58 && (c) <
 __UNDEFINED__ isXDIGIT(c)       (isDIGIT(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
 #endif
 
+/* Until we figure out how to support this in older perls... */
+#if { VERSION >= 5.8.0 }
+
+__UNDEFINED__ HeUTF8(he)        ((HeKLEN(he) == HEf_SVKEY) ?            \
+                                 SvUTF8(HeKEY_sv(he)) :                 \
+                                 (U32)HeKUTF8(he))
+
+#endif
+
 =xsmisc
 
 typedef XSPROTO(XSPROTO_test_t);
@@ -485,7 +495,31 @@ Perl_ppaddr_t(string)
                 LEAVE;
                 XSRETURN(1);
 
-=tests plan => 39
+#if { VERSION >= 5.8.0 }
+
+void
+check_HeUTF8(utf8_key)
+        SV *utf8_key;
+        PREINIT:
+                HV *hash;
+                HE *ent;
+                STRLEN klen;
+                char *key;
+        PPCODE:
+                hash = newHV();
+
+                key = SvPV(utf8_key, klen);
+                if (SvUTF8(utf8_key)) klen *= -1;
+                hv_store(hash, key, klen, newSVpvs("string"), 0);
+                hv_iterinit(hash);
+                ent = hv_iternext(hash);
+                mXPUSHp((HeUTF8(ent) == 0 ? "norm" : "utf8"), 4);
+                hv_undef(hash);
+
+
+#endif
+
+=tests plan => 41
 
 use vars qw($my_sv @my_av %my_hv);
 
@@ -565,3 +599,13 @@ ok(Devel::PPPort::SVf('abc'), $] >= 5.004 ? '[abc]' : 'abc');
 ok(&Devel::PPPort::Perl_ppaddr_t("FOO"), "foo");
 
 ok(&Devel::PPPort::ptrtests(), 63);
+
+if ($] >= 5.009000) {
+  eval q{
+    ok(&Devel::PPPort::check_HeUTF8("hello"), "norm");
+    ok(&Devel::PPPort::check_HeUTF8("\N{U+263a}"), "utf8");
+  };
+} else {
+  ok(1, 1);
+  ok(1, 1);
+}
index 0a90ed6..06feb79 100644 (file)
@@ -297,7 +297,7 @@ before sending a bug report.
 
 If F<ppport.h> was generated using the latest version of
 C<Devel::PPPort> and is causing failure of this module, please
-file a bug report using the CPAN Request Tracker at L<http://rt.cpan.org/>.
+file a bug report here: L<https://github.com/mhx/Devel-PPPort/issues/>
 
 Please include the following information:
 
index 8d28fee..cef6c40 100644 (file)
@@ -9,11 +9,11 @@
 ##
 ################################################################################
 
-=tests plan => 235
+=tests plan => 238
 
 BEGIN {
   if ($ENV{'SKIP_SLOW_TESTS'}) {
-    for (1 .. 235) {
+    for (1 .. 238) {
       skip("skip: SKIP_SLOW_TESTS", 0);
     }
     exit 0;
@@ -58,6 +58,20 @@ END {
 
 ok(&Devel::PPPort::WriteFile("ppport.h"));
 
+# Check GetFileContents()
+ok(-e "ppport.h", 1);
+
+my $data;
+
+open(F, "<ppport.h") or die "Failed to open ppport.h: $!";
+while(<F>) {
+  $data .= $_;
+}
+close(F);
+
+ok(Devel::PPPort::GetFileContents("ppport.h"), $data);
+ok(Devel::PPPort::GetFileContents(), $data);
+
 sub comment
 {
   my $c = shift;
index a8a477f..41a4907 100644 (file)
@@ -80,10 +80,10 @@ pv_escape(pTHX_ SV *dsv, char const * const str,
         if (u > 255 || (flags & PERL_PV_ESCAPE_ALL)) {
             if (flags & PERL_PV_ESCAPE_FIRSTCHAR)
                 chsize = my_snprintf(octbuf, sizeof octbuf,
-                                      "%"UVxf, u);
+                                      "%" UVxf, u);
             else
                 chsize = my_snprintf(octbuf, sizeof octbuf,
-                                      "%cx{%"UVxf"}", esc, u);
+                                      "%cx{%" UVxf "}", esc, u);
         } else if (flags & PERL_PV_ESCAPE_NOBACKSLASH) {
             chsize = 1;
         } else {
index 0013a4b..c159d4c 100644 (file)
@@ -79,7 +79,7 @@ sub parse_partspec
   while (<F>) {
     /[ \t]+$/ and warn "$file:$.: warning: trailing whitespace\n";
     if ($section eq 'implementation') {
-      m!//! && !m!(?:=~|s/).*//! && !m!(?:ht|f)tp://!
+      m!//! && !m!(?:=~|s/).*//! && !m!(?:ht|f)tp(?:s)://!
           and warn "$file:$.: warning: potential C++ comment\n";
     }
     /^##/ and next;
index da0dfae..893212b 100644 (file)
@@ -27,7 +27,7 @@ use File::Find;
 use List::Util qw(max);
 use Config;
 
-my $VERSION = '3.21';
+my $VERSION = '3.24';
 
 $| = 1;
 my %OPT = (
index 0bfe053..f467613 100644 (file)
@@ -30,9 +30,9 @@ BEGIN {
     require 'testutil.pl' if $@;
   }
 
-  if (15) {
+  if (23) {
     load();
-    plan(tests => 15);
+    plan(tests => 23);
   }
 }
 
@@ -48,6 +48,30 @@ bootstrap Devel::PPPort;
 
 package main;
 
+# Find proper magic
+ok(my $obj1 = Devel::PPPort->new_with_mg());
+ok(Devel::PPPort::as_string($obj1), 'hello');
+
+# Find with no magic
+my $obj = bless {}, 'Fake::Class';
+ok(Devel::PPPort::as_string($obj), "Sorry, your princess is in another castle.");
+
+# Find with other magic (not the magic we are looking for)
+ok($obj = Devel::PPPort->new_with_other_mg());
+ok(Devel::PPPort::as_string($obj), "Sorry, your princess is in another castle.");
+
+# Okay, attempt to remove magic that isn't there
+Devel::PPPort::remove_other_magic($obj1);
+ok(Devel::PPPort::as_string($obj1), 'hello');
+
+# Remove magic that IS there
+Devel::PPPort::remove_null_magic($obj1);
+ok(Devel::PPPort::as_string($obj1), "Sorry, your princess is in another castle.");
+
+# Removing when no magic present
+Devel::PPPort::remove_null_magic($obj1);
+ok(Devel::PPPort::as_string($obj1), "Sorry, your princess is in another castle.");
+
 use Tie::Hash;
 my %h;
 tie %h, 'Tie::StdHash';
index 30a5c8c..275fa98 100644 (file)
@@ -30,9 +30,9 @@ BEGIN {
     require 'testutil.pl' if $@;
   }
 
-  if (39) {
+  if (41) {
     load();
-    plan(tests => 39);
+    plan(tests => 41);
   }
 }
 
@@ -127,3 +127,13 @@ ok(&Devel::PPPort::Perl_ppaddr_t("FOO"), "foo");
 
 ok(&Devel::PPPort::ptrtests(), 63);
 
+if ($] >= 5.009000) {
+  eval q{
+    ok(&Devel::PPPort::check_HeUTF8("hello"), "norm");
+    ok(&Devel::PPPort::check_HeUTF8("\N{U+263a}"), "utf8");
+  };
+} else {
+  ok(1, 1);
+  ok(1, 1);
+}
+
index fe4ade0..45840f9 100644 (file)
@@ -30,9 +30,9 @@ BEGIN {
     require 'testutil.pl' if $@;
   }
 
-  if (235) {
+  if (238) {
     load();
-    plan(tests => 235);
+    plan(tests => 238);
   }
 }
 
@@ -50,7 +50,7 @@ package main;
 
 BEGIN {
   if ($ENV{'SKIP_SLOW_TESTS'}) {
-    for (1 .. 235) {
+    for (1 .. 238) {
       skip("skip: SKIP_SLOW_TESTS", 0);
     }
     exit 0;
@@ -95,6 +95,20 @@ END {
 
 ok(&Devel::PPPort::WriteFile("ppport.h"));
 
+# Check GetFileContents()
+ok(-e "ppport.h", 1);
+
+my $data;
+
+open(F, "<ppport.h") or die "Failed to open ppport.h: $!";
+while(<F>) {
+  $data .= $_;
+}
+close(F);
+
+ok(Devel::PPPort::GetFileContents("ppport.h"), $data);
+ok(Devel::PPPort::GetFileContents(), $data);
+
 sub comment
 {
   my $c = shift;