]> git.vpit.fr Git - perl/modules/Sub-Op.git/commitdiff
This is 0.02 v0.02
authorVincent Pit <vince@profvince.com>
Fri, 8 Jan 2010 21:37:15 +0000 (22:37 +0100)
committerVincent Pit <vince@profvince.com>
Fri, 8 Jan 2010 21:37:15 +0000 (22:37 +0100)
Changes
META.yml
README
lib/Sub/Op.pm
t/Sub-Op-LexicalSub/lib/Sub/Op/LexicalSub.pm

diff --git a/Changes b/Changes
index d0289048d738bec175d2e2d7e650d6da06dfc8e3..150f2f53f162b2a1a7d72adc353fb40e99b7a8d9 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,13 @@
 Revision history for Sub-Op
 
 Revision history for Sub-Op
 
+0.02    2010-01-08 21:40 UTC
+        + Chg : INCOMPATIBLE CHANGE : The "len" member of the sub_op_config_t
+                struct was renamed to "namelen".
+        + Fix : Handle existing prototyped subs and constants.
+        + Fix : Less symbols and packages should be vivified under B::.
+        + Tst : Test monkeypatching of B::OP and B::Deparse.
+        + Upd : Bump Variable::Magic dependency to 0.40.
+
 0.01    2010-01-02 21:10 UTC
         First version, released on an unsuspecting world.
 
 0.01    2010-01-02 21:10 UTC
         First version, released on an unsuspecting world.
 
index a28249c131976291e1ed35af68afdace9d99f64e..ae86514a4f1915969d654e6e2cb872548438d311 100644 (file)
--- a/META.yml
+++ b/META.yml
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               Sub-Op
 --- #YAML:1.0
 name:               Sub-Op
-version:            0.01
+version:            0.02
 abstract:           Install subroutines as opcodes.
 author:
     - Vincent Pit <perl@profvince.com>
 abstract:           Install subroutines as opcodes.
 author:
     - Vincent Pit <perl@profvince.com>
@@ -18,13 +18,15 @@ build_requires:
     ExtUtils::MakeMaker:  0
     File::Spec:           0
     POSIX:                0
     ExtUtils::MakeMaker:  0
     File::Spec:           0
     POSIX:                0
+    Scalar::Util:         0
     Test::More:           0
     Test::More:           0
-    Variable::Magic:      0.39
+    Variable::Magic:      0.40
 requires:
     B::Hooks::EndOfScope:  0
     DynaLoader:           0
     perl:                 5.01
 requires:
     B::Hooks::EndOfScope:  0
     DynaLoader:           0
     perl:                 5.01
-    Variable::Magic:      0.39
+    Scalar::Util:         0
+    Variable::Magic:      0.40
 resources:
     bugtracker:  http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Sub-Op
     homepage:    http://search.cpan.org/dist/Sub-Op/
 resources:
     bugtracker:  http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Sub-Op
     homepage:    http://search.cpan.org/dist/Sub-Op/
diff --git a/README b/README
index 4fe59d2a643fc35de44802cce20357484b13dfdd..2273fa8f1eb82ef5ad9576e3982014bdda8d0a8c 100644 (file)
--- a/README
+++ b/README
@@ -2,7 +2,7 @@ NAME
     Sub::Op - Install subroutines as opcodes.
 
 VERSION
     Sub::Op - Install subroutines as opcodes.
 
 VERSION
-    Version 0.01
+    Version 0.02
 
 SYNOPSIS
     In your XS file :
 
 SYNOPSIS
     In your XS file :
@@ -27,11 +27,11 @@ SYNOPSIS
         BOOT:
         {
          sub_op_config_t c;
         BOOT:
         {
          sub_op_config_t c;
-         c.name  = "reftype";
-         c.len   = sizeof("reftype")-1;
-         c.pp    = scalar_util_reftype;
-         c.check = 0;
-         c.ud    = NULL;
+         c.name    = "reftype";
+         c.namelen = sizeof("reftype")-1;
+         c.pp      = scalar_util_reftype;
+         c.check   = 0;
+         c.ud      = NULL;
          sub_op_register(aTHX_ &c);
         }
 
          sub_op_register(aTHX_ &c);
         }
 
@@ -98,7 +98,7 @@ C API
         The name of the subroutine you want to replace. Allowed to be
         static.
 
         The name of the subroutine you want to replace. Allowed to be
         static.
 
-    *   "STRLEN len"
+    *   "STRLEN namelen"
 
         "name"'s length, in bytes.
 
 
         "name"'s length, in bytes.
 
@@ -146,6 +146,17 @@ EXAMPLES
     See the t/Sub-Op-LexicalSub directory that implements a complete
     example.
 
     See the t/Sub-Op-LexicalSub directory that implements a complete
     example.
 
+CAVEATS
+    Preexistent definitions of a sub whose name is handled by Sub::Op are
+    restored at the end of the lexical scope in which the module is used.
+    But if you define a sub in the scope of action of Sub::Op with a name
+    that is currently being replaced, the new declaration will be
+    obliterated at the scope end.
+
+    Function calls without parenthesis inside an "eval STRING" in the scope
+    of the pragma won't be replaced. I know a few ways of fixing this, but
+    I've not yet decided on which.
+
 DEPENDENCIES
     perl 5.10.
 
 DEPENDENCIES
     perl 5.10.
 
@@ -156,6 +167,11 @@ DEPENDENCIES
 SEE ALSO
     subs::auto.
 
 SEE ALSO
     subs::auto.
 
+    B::Hooks::XSUB::CallAsOp provides a C API to declare XSUBs that
+    effectively call a specific PP function. Thus, it allows you to write
+    XSUBs with the PP stack conventions used for implementing perl core
+    keywords. There's no opcode replacement and no parsing hacks.
+
     B::Hooks::OP::Check::EntersubForCV.
 
 AUTHOR
     B::Hooks::OP::Check::EntersubForCV.
 
 AUTHOR
index 1c783f6fa3504399522cc4dfb27ca20476b3517e..8b7325658143c7f5ac1763b84c11c8a5649ea813 100644 (file)
@@ -11,7 +11,7 @@ Sub::Op - Install subroutines as opcodes.
 
 =head1 VERSION
 
 
 =head1 VERSION
 
-Version 0.01
+Version 0.02
 
 =cut
 
 
 =cut
 
@@ -20,7 +20,7 @@ our ($VERSION, @ISA);
 sub dl_load_flags { 0x01 }
 
 BEGIN {
 sub dl_load_flags { 0x01 }
 
 BEGIN {
- $VERSION = '0.01';
+ $VERSION = '0.02';
  require DynaLoader;
  push @ISA, 'DynaLoader';
  __PACKAGE__->bootstrap($VERSION);
  require DynaLoader;
  push @ISA, 'DynaLoader';
  __PACKAGE__->bootstrap($VERSION);
index 8d04dc0df558b88b9a4424ed47931c616cd48c39..0888de565698ac6bffa1c2d27f3feb750e72b830 100644 (file)
@@ -8,7 +8,7 @@ our ($VERSION, @ISA);
 use Sub::Op;
 
 BEGIN {
 use Sub::Op;
 
 BEGIN {
- $VERSION = '0.01';
+ $VERSION = '0.02';
  require DynaLoader;
  push @ISA, 'DynaLoader';
  __PACKAGE__->bootstrap($VERSION);
  require DynaLoader;
  push @ISA, 'DynaLoader';
  __PACKAGE__->bootstrap($VERSION);