home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _9fb69952bce76cb4376298e02ef01d73 < prev    next >
Encoding:
Text File  |  2004-06-01  |  2.2 KB  |  96 lines

  1. package XS::Typemap;
  2.  
  3. =head1 NAME
  4.  
  5. XS::Typemap - module to test the XS typemaps distributed with perl
  6.  
  7. =head1 SYNOPSIS
  8.  
  9.   use XS::Typemap;
  10.  
  11.   $output = T_IV( $input );
  12.   $output = T_PV( $input );
  13.   @output = T_ARRAY( @input );
  14.  
  15. =head1 DESCRIPTION
  16.  
  17. This module is used to test that the XS typemaps distributed
  18. with perl are working as advertised. A function is available
  19. for each typemap definition (eventually). In general each function
  20. takes a variable, processes it through the OUTPUT typemap and then
  21. returns it using the INPUT typemap.
  22.  
  23. A test script can then compare the input and output to make sure they
  24. are the expected values. When only an input or output function is
  25. provided the function will be named after the typemap entry and have
  26. either '_IN' or '_OUT' appended.
  27.  
  28. All the functions are exported. There is no reason not to do this since
  29. the entire purpose is for testing Perl. Namespace pollution will be limited
  30. to the test script.
  31.  
  32. =cut
  33.  
  34. use base qw/ DynaLoader Exporter /;
  35.  
  36.  
  37. use vars qw/ $VERSION @EXPORT /;
  38.  
  39. $VERSION = '0.01';
  40.  
  41. @EXPORT = (qw/
  42.        T_SV
  43.        T_SVREF
  44.        T_AVREF
  45.        T_HVREF
  46.        T_CVREF
  47.        T_SYSRET_fail T_SYSRET_pass
  48.        T_UV
  49.        T_IV
  50.        T_INT
  51.            T_ENUM
  52.            T_BOOL
  53.            T_U_INT
  54.            T_SHORT
  55.            T_U_SHORT
  56.            T_LONG
  57.            T_U_LONG
  58.            T_CHAR
  59.            T_U_CHAR
  60.            T_FLOAT
  61.            T_NV
  62.        T_DOUBLE
  63.        T_PV
  64.        T_PTR_IN T_PTR_OUT
  65.        T_PTRREF_IN T_PTRREF_OUT
  66.        T_REF_IV_REF
  67.        T_REF_IV_PTR_IN T_REF_IV_PTR_OUT
  68.        T_PTROBJ_IN T_PTROBJ_OUT
  69.        T_OPAQUE_IN T_OPAQUE_OUT T_OPAQUE_array
  70.        T_OPAQUEPTR_IN T_OPAQUEPTR_OUT T_OPAQUEPTR_OUT_short
  71.            T_OPAQUEPTR_IN_struct T_OPAQUEPTR_OUT_struct
  72.        T_ARRAY
  73.        T_STDIO_open T_STDIO_close T_STDIO_print
  74.        /);
  75.  
  76.  
  77. bootstrap XS::Typemap;
  78.  
  79. =head1 NOTES
  80.  
  81. This module is for testing only and should not normally be installed.
  82.  
  83. =head1 AUTHOR
  84.  
  85. Tim Jenness E<lt>t.jenness@jach.hawaii.eduE<gt>
  86.  
  87. Copyright (C) 2001 Tim Jenness All Rights Reserved.  This program is
  88. free software; you can redistribute it and/or modify it under the same
  89. terms as Perl itself.
  90.  
  91. =cut
  92.  
  93.  
  94. 1;
  95.  
  96.