| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Games::Go::GMP; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 1 |  |  | 1 |  | 5982 | use 5.006; | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 33 |  | 
| 4 | 1 |  |  | 1 |  | 5 | use strict; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 24 |  | 
| 5 | 1 |  |  | 1 |  | 4 | use warnings; | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 36 |  | 
| 6 | 1 |  |  | 1 |  | 743 | use Errno; | 
|  | 1 |  |  |  |  | 1206 |  | 
|  | 1 |  |  |  |  | 37 |  | 
| 7 | 1 |  |  | 1 |  | 4 | use Carp; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 62 |  | 
| 8 |  |  |  |  |  |  |  | 
| 9 |  |  |  |  |  |  | require Exporter; | 
| 10 |  |  |  |  |  |  | require DynaLoader; | 
| 11 | 1 |  |  | 1 |  | 829 | use AutoLoader; | 
|  | 1 |  |  |  |  | 1448 |  | 
|  | 1 |  |  |  |  | 5 |  | 
| 12 |  |  |  |  |  |  |  | 
| 13 |  |  |  |  |  |  | our @ISA = qw(Exporter DynaLoader); | 
| 14 |  |  |  |  |  |  |  | 
| 15 |  |  |  |  |  |  | # Items to export into callers namespace by default. Note: do not export | 
| 16 |  |  |  |  |  |  | # names by default without a very good reason. Use EXPORT_OK instead. | 
| 17 |  |  |  |  |  |  | # Do not simply export all your public functions/methods/constants. | 
| 18 |  |  |  |  |  |  |  | 
| 19 |  |  |  |  |  |  | # This allows declaration	use Games::Go::GMP ':all'; | 
| 20 |  |  |  |  |  |  | # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK | 
| 21 |  |  |  |  |  |  | # will save memory. | 
| 22 |  |  |  |  |  |  | our %EXPORT_TAGS = ( 'all' => [ qw( | 
| 23 |  |  |  |  |  |  | gmp_check | 
| 24 |  |  |  |  |  |  | gmp_chineseRules | 
| 25 |  |  |  |  |  |  | gmp_create | 
| 26 |  |  |  |  |  |  | gmp_destroy | 
| 27 |  |  |  |  |  |  | gmp_handicap | 
| 28 |  |  |  |  |  |  | gmp_iAmWhite | 
| 29 |  |  |  |  |  |  | gmp_komi | 
| 30 |  |  |  |  |  |  | gmp_resultString | 
| 31 |  |  |  |  |  |  | gmp_sendMove | 
| 32 |  |  |  |  |  |  | gmp_sendPass | 
| 33 |  |  |  |  |  |  | gmp_sendUndo | 
| 34 |  |  |  |  |  |  | gmp_size | 
| 35 |  |  |  |  |  |  | gmp_startGame | 
| 36 |  |  |  |  |  |  | ) ] ); | 
| 37 |  |  |  |  |  |  |  | 
| 38 |  |  |  |  |  |  | our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); | 
| 39 |  |  |  |  |  |  |  | 
| 40 |  |  |  |  |  |  | our @EXPORT = qw( | 
| 41 |  |  |  |  |  |  |  | 
| 42 |  |  |  |  |  |  | ); | 
| 43 |  |  |  |  |  |  | our $VERSION = '0.01'; | 
| 44 |  |  |  |  |  |  |  | 
| 45 |  |  |  |  |  |  | sub AUTOLOAD { | 
| 46 |  |  |  |  |  |  | # This AUTOLOAD is used to 'autoload' constants from the constant() | 
| 47 |  |  |  |  |  |  | # XS function.  If a constant is not found then control is passed | 
| 48 |  |  |  |  |  |  | # to the AUTOLOAD in AutoLoader. | 
| 49 |  |  |  |  |  |  |  | 
| 50 | 0 |  |  | 0 |  |  | my $constname; | 
| 51 | 0 |  |  |  |  |  | our $AUTOLOAD; | 
| 52 | 0 |  |  |  |  |  | ($constname = $AUTOLOAD) =~ s/.*:://; | 
| 53 | 0 | 0 |  |  |  |  | croak "& not defined" if $constname eq 'constant'; | 
| 54 | 0 | 0 |  |  |  |  | my $val = constant($constname, @_ ? $_[0] : 0); | 
| 55 | 0 | 0 |  |  |  |  | if ($! != 0) { | 
| 56 | 0 | 0 |  |  |  |  | if ($!{EINVAL}) { | 
| 57 | 0 |  |  |  |  |  | $AutoLoader::AUTOLOAD = $AUTOLOAD; | 
| 58 | 0 |  |  |  |  |  | goto &AutoLoader::AUTOLOAD; | 
| 59 |  |  |  |  |  |  | } | 
| 60 |  |  |  |  |  |  | else { | 
| 61 | 0 |  |  |  |  |  | croak "Your vendor has not defined Games::Go::GMP macro $constname"; | 
| 62 |  |  |  |  |  |  | } | 
| 63 |  |  |  |  |  |  | } | 
| 64 |  |  |  |  |  |  | { | 
| 65 | 1 |  |  | 1 |  | 246 | no strict 'refs'; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 165 |  | 
|  | 0 |  |  |  |  |  |  | 
| 66 |  |  |  |  |  |  | # Fixed between 5.005_53 and 5.005_61 | 
| 67 | 0 | 0 |  |  |  |  | if ($] >= 5.00561) { | 
| 68 | 0 |  |  | 0 |  |  | *$AUTOLOAD = sub () { $val }; | 
|  | 0 |  |  |  |  |  |  | 
| 69 |  |  |  |  |  |  | } | 
| 70 |  |  |  |  |  |  | else { | 
| 71 | 0 |  |  | 0 |  |  | *$AUTOLOAD = sub { $val }; | 
|  | 0 |  |  |  |  |  |  | 
| 72 |  |  |  |  |  |  | } | 
| 73 |  |  |  |  |  |  | } | 
| 74 | 0 |  |  |  |  |  | goto &$AUTOLOAD; | 
| 75 |  |  |  |  |  |  | } | 
| 76 |  |  |  |  |  |  |  | 
| 77 |  |  |  |  |  |  | bootstrap Games::Go::GMP $VERSION; | 
| 78 |  |  |  |  |  |  |  | 
| 79 |  |  |  |  |  |  | # Preloaded methods go here. | 
| 80 |  |  |  |  |  |  |  | 
| 81 |  |  |  |  |  |  | # Autoload methods go after =cut, and are processed by the autosplit program. | 
| 82 |  |  |  |  |  |  |  | 
| 83 |  |  |  |  |  |  | 1; | 
| 84 |  |  |  |  |  |  | __END__ |