Skip Menu |

This queue is for tickets about the B-LexInfo CPAN distribution.

Report information
The Basics
Id: 33765
Status: open
Priority: 0/
Queue: B-LexInfo

People
Owner: pgollucci [...] p6m7g8.com
Requestors: RURBAN [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.02
Fixed in: (no value)



Subject: Fix for 5.10
Attached patch fixes 5.10 and blead compilation. Also some minor doc errors. -- Reini Urban
Subject: B-LexInfo-0.02.patch
difforig 2008-03-03 Reini Urban <rurban@x-ray.at> diff -ub ./LexInfo.pm.orig --- ./LexInfo.pm.orig 1999-06-29 04:44:50.000000000 +0000 +++ ./LexInfo.pm 2008-03-03 01:08:22.468750000 +0000 @@ -202,7 +202,7 @@ my($sv) = @_; +{ NULL => sprintf "0x%lx", $$sv } } - + sub B::SPECIAL::lexval { my($sv) = @_; +{ SPECIAL => sprintf "0x%lx", $$sv } @@ -218,8 +218,8 @@ =head1 SYNOPSIS - use B::ShowLex (); - my $lexi = B::ShowLex->new; + use B::LexInfo (); + my $lexi = B::LexInfo->new; =head1 DESCRIPTION diff -ub ./LexInfo.xs.orig --- ./LexInfo.xs.orig 1999-06-28 07:41:44.000000000 +0000 +++ ./LexInfo.xs 2008-03-03 01:04:52.640625000 +0000 @@ -4,7 +4,7 @@ typedef SV * B__PV; -static XS(XS_B__PV_LEN) +XS(XS_B__PV_LEN) { dXSARGS; if (items != 1) @@ -15,7 +15,7 @@ if (SvROK(ST(0))) { IV tmp = SvIV((SV*)SvRV(ST(0))); - sv = (B__PV) tmp; + sv = INT2PTR(B__PV,tmp); } else croak("sv is not a reference"); @@ -27,7 +27,7 @@ XSRETURN(1); } -static XS(XS_B__PV_CUR) +XS(XS_B__PV_CUR) { dXSARGS; if (items != 1) @@ -38,7 +38,7 @@ if (SvROK(ST(0))) { IV tmp = SvIV((SV*)SvRV(ST(0))); - sv = (B__PV) tmp; + sv = INT2PTR(B__PV,tmp); } else croak("sv is not a reference"); @@ -50,7 +50,7 @@ XSRETURN(1); } -static void boot_B_LexInfo(void) +void boot_B_LexInfo(void) { /* these were not present in 5.005_57 * make conditional in case they are added
Hi, Thanks. This patch doesn't apply. Can you regenerate it against: https://svn.perl.org/modules/B-LexInfo/trunk
From: RURBAN [...] cpan.org
On Fri May 16 00:26:00 2008, PGOLLUCCI wrote: Show quoted text
> Hi, > Thanks. This patch doesn't apply. > > Can you regenerate it against: > https://svn.perl.org/modules/B-LexInfo/trunk
Hi, This module is still a mess. I've added some rudementary tests and see that they dont work. Can you check how to write the tests so that they make some sense. I just took the README to write these revised patch attached. -- Reini Urban
difforig B-LexInfo diff -u B-LexInfo/LexInfo.pm.orig --- B-LexInfo/LexInfo.pm.orig 2008-05-16 16:56:15.015625000 +0000 +++ B-LexInfo/LexInfo.pm 2008-05-16 17:16:45.937500000 +0000 @@ -134,9 +134,9 @@ my $cmd = "$DiffCmd $file_b $file_a"; if ($cmd =~ /^([^<>|;]+)$/) { $cmd= $1; - } + } else { - die "TAINTED data in `$cmd'"; + die "TAINTED data in `$cmd'"; } my $pipe = Symbol::gensym(); @@ -213,7 +213,7 @@ my($sv) = @_; +{ NULL => sprintf "0x%lx", $$sv } } - + sub B::SPECIAL::lexval { my($sv) = @_; +{ SPECIAL => sprintf "0x%lx", $$sv } @@ -229,8 +229,8 @@ =head1 SYNOPSIS - use B::ShowLex (); - my $lexi = B::ShowLex->new; + use B::LexInfo (); + my $lexi = B::LexInfo->new; =head1 DESCRIPTION diff -u B-LexInfo/LexInfo.xs.orig --- B-LexInfo/LexInfo.xs.orig 2008-05-16 16:56:15.078125000 +0000 +++ B-LexInfo/LexInfo.xs 2008-05-16 16:58:04.453125000 +0000 @@ -4,7 +4,7 @@ typedef SV * B__PV; -static XS(XS_B__PV_LEN) +XS(XS_B__PV_LEN) { dXSARGS; @@ -30,7 +30,7 @@ XSRETURN(1); } -static XS(XS_B__PV_CUR) +XS(XS_B__PV_CUR) { dXSARGS; @@ -56,7 +56,7 @@ XSRETURN(1); } -static void boot_B_LexInfo(void) +void boot_B_LexInfo(void) { /* these were not present in 5.005_57 * make conditional in case they are added diff -u B-LexInfo/README.orig --- B-LexInfo/README.orig 2008-05-16 16:56:15.078125000 +0000 +++ B-LexInfo/README 2008-05-16 17:04:58.140625000 +0000 @@ -2,8 +2,8 @@ B::LexInfo - Show information about subroutine lexical variables SYNOPSIS - use B::ShowLex (); - my $lexi = B::ShowLex->new; + use B::LexInfo (); + my $lexi = B::LexInfo->new; DESCRIPTION Perl stores lexical variable names and values inside a *padlist* diff -u B-LexInfo/t/02_cvlexinfo.t.orig --- B-LexInfo/t/02_cvlexinfo.t.orig 2008-05-16 17:19:18.625000000 +0000 +++ B-LexInfo/t/02_cvlexinfo.t 2008-05-16 17:15:08.984375000 +0000 @@ -0,0 +1,13 @@ +#!/usr/bin/env perl -w + +use strict; +use Test; +BEGIN { plan tests => 1 } + +use B::LexInfo; +my $lexi = B::LexInfo->new; +my $info = $lexi->cvlexinfo('Data::Dumper::Seen'); + +ok(1); + +__END__ diff -u B-LexInfo/t/03_stash_cvlexinfo.t.orig --- B-LexInfo/t/03_stash_cvlexinfo.t.orig 2008-05-16 17:19:36.484375000 +0000 +++ B-LexInfo/t/03_stash_cvlexinfo.t 2008-05-16 17:17:44.953125000 +0000 @@ -0,0 +1,15 @@ +#!/usr/bin/env perl -w + +use strict; +use Test; +BEGIN { plan tests => 1 } + +use B::LexInfo; +my $lexi = B::LexInfo->new; +my $info = $lexi->stash_cvlexinfo('Data::Dumper'); +ok(1); + +exit; + +__END__ + diff -u B-LexInfo/t/04_dumper.t.orig --- B-LexInfo/t/04_dumper.t.orig 2008-05-16 17:19:36.484375000 +0000 +++ B-LexInfo/t/04_dumper.t 2008-05-16 17:18:29.531250000 +0000 @@ -0,0 +1,13 @@ +#!/usr/bin/env perl -w + +use strict; +use Test; +BEGIN { plan tests => 1 } + +use B::LexInfo; +my $lexi = B::LexInfo->new; +my $info = $lexi->stash_cvlexinfo('Data::Dumper'); +ok ($lexi->dumper($info)); + +__END__ + diff -u B-LexInfo/t/05_diff.t.orig --- B-LexInfo/t/05_diff.t.orig 2008-05-16 17:19:36.492375000 +0000 +++ B-LexInfo/t/05_diff.t 2008-05-16 17:12:33.218750000 +0000 @@ -0,0 +1,16 @@ +#!/usr/bin/env perl -w + +use strict; +use Test; +BEGIN { plan tests => 1 } + +use B::LexInfo; +my $lexi = B::LexInfo->new; +my $before = $lexi->stash_cvlexinfo('Data::Dumper'); +my $b = Data::Dumper->new([$a], ['c']); +my $after = $lexi->stash_cvlexinfo('Data::Dumper'); +my $diff = B::LexInfo->diff($before, $after); +ok ($$diff); + +__END__ + diff -u B-LexInfo/t/06_cvrundiff.t.orig --- B-LexInfo/t/06_cvrundiff.t.orig 2008-05-16 17:19:41.984375000 +0000 +++ B-LexInfo/t/06_cvrundiff.t 2008-05-16 17:14:20.500000000 +0000 @@ -0,0 +1,20 @@ +#!/usr/bin/env perl -w + +use strict; +use Test; +BEGIN { plan tests => 1 } + +package Foo; +use B::LexInfo (); + +sub bar { + my($string) = @_; +} + +my $lexi = B::LexInfo->new; +my $diff = $lexi->cvrundiff('Foo::bar', "a string"); + +ok ($$diff); + +__END__ +