X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FOpcode%2FOpcode.pm;h=9f426cd88298b64e3dad03359e8df2525504c09c;hb=76df5e8f6f9a368c3b6f3dcca177104be7f3fc8c;hp=ff3899f835a04d7f77fd240906292cf6bb08fb36;hpb=c529f79d594c53d3968d464c57ac24a21137dd09;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/Opcode/Opcode.pm b/ext/Opcode/Opcode.pm index ff3899f..9f426cd 100644 --- a/ext/Opcode/Opcode.pm +++ b/ext/Opcode/Opcode.pm @@ -1,19 +1,20 @@ package Opcode; -require 5.002; +use 5.006_001; -use vars qw($VERSION $XS_VERSION @ISA @EXPORT_OK); +use strict; + +our($VERSION, $XS_VERSION, @ISA, @EXPORT_OK); -$VERSION = "1.04"; +$VERSION = "1.06"; $XS_VERSION = "1.03"; -use strict; use Carp; use Exporter (); -use DynaLoader (); -@ISA = qw(Exporter DynaLoader); +use XSLoader (); BEGIN { + @ISA = qw(Exporter); @EXPORT_OK = qw( opset ops_to_opset opset_to_ops opset_to_hex invert_opset @@ -28,7 +29,7 @@ sub opset_to_hex ($); sub opdump (;$); use subs @EXPORT_OK; -bootstrap Opcode $XS_VERSION; +XSLoader::load 'Opcode', $XS_VERSION; _init_optags(); @@ -163,7 +164,7 @@ accumulated set of ops at that point. =item an operator set (opset) -An I as a binary string of approximately 43 bytes which holds a +An I as a binary string of approximately 44 bytes which holds a set or zero or more operators. The opset and opset_to_ops functions can be used to convert from @@ -185,7 +186,7 @@ tags and sets. All are available for export by the package. =item opcodes In a scalar context opcodes returns the number of opcodes in this -version of perl (around 340 for perl5.002). +version of perl (around 350 for perl-5.7.0). In a list context it returns a list of all the operator names. (Not yet implemented, use @names = opset_to_ops(full_opset).) @@ -330,7 +331,7 @@ invert_opset function. list lslice splice push pop shift unshift reverse - cond_expr flip flop andassign orassign and or xor + cond_expr flip flop andassign orassign dorassign and or dor xor warn die lineseq nextstate scope enter leave setstate @@ -414,6 +415,8 @@ These are a hotchpotch of opcodes still waiting to be considered entertry leavetry -- can be used to 'hide' fatal errors + custom -- where should this go + =item :base_math These ops are not included in :base_core because of the risk of them being