]> git.vpit.fr Git - perl/modules/Sub-Op.git/commitdiff
Rename Sub::Op::Test to Sub::Op::LexicalSub
authorVincent Pit <vince@profvince.com>
Sat, 2 Jan 2010 18:32:51 +0000 (19:32 +0100)
committerVincent Pit <vince@profvince.com>
Sat, 2 Jan 2010 18:32:51 +0000 (19:32 +0100)
MANIFEST
Makefile.PL
configure_test.pl
lib/Sub/Op.pm
samples/try.pl
t/10-base.t
t/11-existing.t
t/Sub-Op-LexicalSub/LexicalSub.xs [moved from t/Sub-Op-Test/Test.xs with 68% similarity]
t/Sub-Op-LexicalSub/Makefile.PL [moved from t/Sub-Op-Test/Makefile.PL with 96% similarity]
t/Sub-Op-LexicalSub/lib/Sub/Op/LexicalSub.pm [moved from t/Sub-Op-Test/lib/Sub/Op/Test.pm with 90% similarity]

index b8e59cba714dc4b979774c3e3a40eb4f525917d7..cae08bd758afb7c54e35a86c7ec108d8f6dae293 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -15,6 +15,6 @@ t/91-pod.t
 t/92-pod-coverage.t
 t/95-portability-files.t
 t/99-kwalitee.t
 t/92-pod-coverage.t
 t/95-portability-files.t
 t/99-kwalitee.t
-t/Sub-Op-Test/Makefile.PL
-t/Sub-Op-Test/Test.xs
-t/Sub-Op-Test/lib/Sub/Op/Test.pm
+t/Sub-Op-LexicalSub/Makefile.PL
+t/Sub-Op-LexicalSub/LexicalSub.xs
+t/Sub-Op-LexicalSub/lib/Sub/Op/LexicalSub.pm
index 248c76f9d94fd3cca50e3c0acd1fb9dbed59a3b2..6069830e4976897ba31de3c51e1d695ba6db5ecf 100644 (file)
@@ -88,11 +88,11 @@ sub MY::postamble {
  <<' POSTAMBLE';
 configure_test.pl: args.dat
 
  <<' POSTAMBLE';
 configure_test.pl: args.dat
 
-t/Sub-Op-Test/Makefile: configure_test.pl
+t/Sub-Op-LexicalSub/Makefile: configure_test.pl
        $(FULLPERLRUN) configure_test.pl
 
        $(FULLPERLRUN) configure_test.pl
 
-all clean:: t/Sub-Op-Test/Makefile
-       cd t/Sub-Op-Test && $(MAKE) $@
+all clean:: t/Sub-Op-LexicalSub/Makefile
+       cd t/Sub-Op-LexicalSub && $(MAKE) $@
 
 clean::
        $(RM_RF) args.dat
 
 clean::
        $(RM_RF) args.dat
index 447376d447348c1349de17c3c0bc9721838fa3b7..31d9929a3da739fbdd5bb0705b0384d1ac698169 100644 (file)
@@ -37,7 +37,7 @@ my $ret = EXIT_FAILURE;
 
  my $guard = bless { cwd => do { require Cwd; Cwd::cwd() } }, 'CwdSaver';
 
 
  my $guard = bless { cwd => do { require Cwd; Cwd::cwd() } }, 'CwdSaver';
 
- chdir 't/Sub-Op-Test' or die "chdir('t/Sub-Op-Test'): $!";
+ chdir 't/Sub-Op-LexicalSub' or die "chdir('t/Sub-Op-LexicalSub'): $!";
 
  system { $^X } $^X, 'Makefile.PL', @args;
  if ($? == -1) {
 
  system { $^X } $^X, 'Makefile.PL', @args;
  if ($? == -1) {
index 1702f3ee49e731d9efe9ea53b62943571b3a2ad1..8e380ca6835b49a9410b0753778e5a418812b292 100644 (file)
@@ -374,7 +374,7 @@ BEGIN { _monkeypatch() }
 
 =head1 EXAMPLES
 
 
 =head1 EXAMPLES
 
-See the F<t/Sub-Op-Test> directory that implements a complete example.
+See the F<t/Sub-Op-LexicalSub> directory that implements a complete example.
 
 =head1 DEPENDENCIES
 
 
 =head1 DEPENDENCIES
 
index a3e25b5fc2ef0060991b267e922e5d909f291b32..70645492c5f7867483e11646f0aab2900d9b240a 100755 (executable)
@@ -6,14 +6,14 @@ use strict;
 use warnings;
 
 use blib;
 use warnings;
 
 use blib;
-use blib 't/Sub-Op-Test';
+use blib 't/Sub-Op-LexicalSub';
 
 my $code = $ARGV[0];
 die "Usage: $0 'code involving f() and g()'" unless defined $code;
 
 my $cb = eval <<"CODE";
 
 my $code = $ARGV[0];
 die "Usage: $0 'code involving f() and g()'" unless defined $code;
 
 my $cb = eval <<"CODE";
- use Sub::Op::Test f => sub { say 'f(' . join(', ', \@_) . ')'; \@_ };
- use Sub::Op::Test g => sub { say 'g(' . join(', ', \@_) . ')'; \@_ };
+ use Sub::Op::LexicalSub f => sub { say 'f(' . join(', ', \@_) . ')'; \@_ };
+ use Sub::Op::LexicalSub g => sub { say 'g(' . join(', ', \@_) . ')'; \@_ };
  sub { $code }
 CODE
 die $@ if $@;
  sub { $code }
 CODE
 die $@ if $@;
index 1f785e5b4897e9ef9d746edcbba9f6919893677f..c1760c104e47e477750cb8b9db294868715a2435 100644 (file)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
 use strict;
 use warnings;
 
-use blib 't/Sub-Op-Test';
+use blib 't/Sub-Op-LexicalSub';
 
 use Test::More tests => 2 * 15 + 3 * 2 + 2 * 28;
 
 
 use Test::More tests => 2 * 15 + 3 * 2 + 2 * 28;
 
@@ -36,7 +36,7 @@ our $called;
   my $test = "{\n";
   for my $name (@names) {
    $test .= <<"   INIT"
   my $test = "{\n";
   for my $name (@names) {
    $test .= <<"   INIT"
-    use Sub::Op::Test $name => sub {
+    use Sub::Op::LexicalSub $name => sub {
      ++\$called;
      my \$exp = shift \@exp;
      is_deeply \\\@_, \$exp,   '$name: arguments are correct';
      ++\$called;
      my \$exp = shift \@exp;
      is_deeply \\\@_, \$exp,   '$name: arguments are correct';
index fae36fc9bd755120e555ad6f5dd20dd0799560e3..58e23a0a9c02e028f674db046f968171984c5b26 100644 (file)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
 use strict;
 use warnings;
 
-use blib 't/Sub-Op-Test';
+use blib 't/Sub-Op-LexicalSub';
 
 use Test::More tests => (4 + 2 * 4) + (2 * 5);
 
 
 use Test::More tests => (4 + 2 * 4) + (2 * 5);
 
@@ -39,7 +39,7 @@ our $called;
   my $test = "{\n";
   for my $name (@names) {
    $test .= <<"   INIT"
   my $test = "{\n";
   for my $name (@names) {
    $test .= <<"   INIT"
-    use Sub::Op::Test $name => sub {
+    use Sub::Op::LexicalSub $name => sub {
      ++\$called;
      my \$exp = shift \@exp;
      is_deeply \\\@_, \$exp,   '$name: arguments are correct';
      ++\$called;
      my \$exp = shift \@exp;
      is_deeply \\\@_, \$exp,   '$name: arguments are correct';
similarity index 68%
rename from t/Sub-Op-Test/Test.xs
rename to t/Sub-Op-LexicalSub/LexicalSub.xs
index 4a7b97028bc17c844a2ee28157bc75c40f7018df..e67d5baa33d02e4711484180ed6b13fbb4e0905a 100644 (file)
@@ -6,23 +6,23 @@
 #include "perl.h"
 #include "XSUB.h"
 
 #include "perl.h"
 #include "XSUB.h"
 
-#define __PACKAGE__     "Sub::Op::Test"
+#define __PACKAGE__     "Sub::Op::LexicalSub"
 #define __PACKAGE_LEN__ (sizeof(__PACKAGE__)-1)
 
 #include "sub_op.h"
 
 #define __PACKAGE_LEN__ (sizeof(__PACKAGE__)-1)
 
 #include "sub_op.h"
 
-STATIC HV *sub_op_test_map = NULL;
+STATIC HV *sols_map = NULL;
 
 
-STATIC OP *sub_op_test_check(pTHX_ OP *o, void *ud_) {
+STATIC OP *sols_check(pTHX_ OP *o, void *ud_) {
  char buf[sizeof(void*)*2+1];
  SV *cb = ud_;
 
  char buf[sizeof(void*)*2+1];
  SV *cb = ud_;
 
- (void) hv_store(sub_op_test_map, buf, sprintf(buf, "%"UVxf, PTR2UV(o)), cb, 0);
+ (void) hv_store(sols_map, buf, sprintf(buf, "%"UVxf, PTR2UV(o)), cb, 0);
 
  return o;
 }
 
 
  return o;
 }
 
-STATIC OP *sub_op_test_pp(pTHX) {
+STATIC OP *sols_pp(pTHX) {
  dSP;
  dMARK;
  SV *cb;
  dSP;
  dMARK;
  SV *cb;
@@ -31,7 +31,7 @@ STATIC OP *sub_op_test_pp(pTHX) {
  {
   char buf[sizeof(void*)*2+1];
   SV **svp;
  {
   char buf[sizeof(void*)*2+1];
   SV **svp;
-  svp = hv_fetch(sub_op_test_map, buf, sprintf(buf, "%"UVxf, PTR2UV(PL_op)), 0);
+  svp = hv_fetch(sols_map, buf, sprintf(buf, "%"UVxf, PTR2UV(PL_op)), 0);
   if (!svp)
    RETURN;
   cb = *svp;
   if (!svp)
    RETURN;
   cb = *svp;
@@ -57,13 +57,13 @@ STATIC OP *sub_op_test_pp(pTHX) {
 
 /* --- XS ------------------------------------------------------------------ */
 
 
 /* --- XS ------------------------------------------------------------------ */
 
-MODULE = Sub::Op::Test      PACKAGE = Sub::Op::Test
+MODULE = Sub::Op::LexicalSub      PACKAGE = Sub::Op::LexicalSub
 
 PROTOTYPES: ENABLE
 
 BOOT:
 {
 
 PROTOTYPES: ENABLE
 
 BOOT:
 {
- sub_op_test_map = newHV();
+ sols_map = newHV();
 }
 
 void
 }
 
 void
@@ -76,9 +76,9 @@ PPCODE:
   cb = SvRV(cb);
   if (SvTYPE(cb) >= SVt_PVCV) {
    c.name  = SvPV_const(name, c.len);
   cb = SvRV(cb);
   if (SvTYPE(cb) >= SVt_PVCV) {
    c.name  = SvPV_const(name, c.len);
-   c.check = sub_op_test_check;
+   c.check = sols_check;
    c.ud    = SvREFCNT_inc(cb);
    c.ud    = SvREFCNT_inc(cb);
-   c.pp    = sub_op_test_pp;
+   c.pp    = sols_pp;
    sub_op_register(aTHX_ &c);
   }
  }
    sub_op_register(aTHX_ &c);
   }
  }
similarity index 96%
rename from t/Sub-Op-Test/Makefile.PL
rename to t/Sub-Op-LexicalSub/Makefile.PL
index b75f2063c693287219c3a47dfd0ef33f93262a27..6fd506554ce672dd98d8d58cbc6ac9722dee018c 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 use ExtUtils::MakeMaker;
 
 use warnings;
 use ExtUtils::MakeMaker;
 
-my $dist = 'Sub-Op-Test';
+my $dist = 'Sub-Op-LexicalSub';
 
 (my $name = $dist) =~ s{-}{::}g;
 
 
 (my $name = $dist) =~ s{-}{::}g;
 
similarity index 90%
rename from t/Sub-Op-Test/lib/Sub/Op/Test.pm
rename to t/Sub-Op-LexicalSub/lib/Sub/Op/LexicalSub.pm
index ad379a3e76e7542dfc90d9b9d5f5a0ceafbc83e7..8d04dc0df558b88b9a4424ed47931c616cd48c39 100644 (file)
@@ -1,4 +1,4 @@
-package Sub::Op::Test;
+package Sub::Op::LexicalSub;
 
 use strict;
 use warnings;
 
 use strict;
 use warnings;