Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Perl: porters

[perl #111936] Storable - storing 'code' test failure

 

 

Perl porters RSS feed   Index | Next | Previous | View Threaded


perlbug-followup at perl

Mar 23, 2012, 6:04 PM

Post #1 of 4 (115 views)
Permalink
[perl #111936] Storable - storing 'code' test failure

On Thu Mar 22 07:59:46 2012, samuel.ferencik [at] barclays wrote:
> This is a bug report for perl from sferencik [at] gmail,
> generated with the help of perlbug 1.35 running under perl v5.8.5.
>
>
> I'm installing Storable 2.30. Here are some observations from
> t/code.t:
>
> 1) I get test failures when freezing/thawing Test::More::ok:
>

Perl 5.8.5 is no longer supported. Can you try this with the current
supported version of Perl, 5.14.2? If you install that, you will
probably also get Storable version 2.34 along with it.

Thank you very much.
Jim Keenan

---
via perlbug: queue: perl5 status: new
https://rt.perl.org:443/rt3/Ticket/Display.html?id=111936


perlbug-followup at perl

Mar 24, 2012, 9:38 AM

Post #2 of 4 (112 views)
Permalink
[perl #111936] Storable - storing 'code' test failure [In reply to]

On Fri Mar 23 18:04:54 2012, jkeenan wrote:
> On Thu Mar 22 07:59:46 2012, samuel.ferencik [at] barclays wrote:
> > This is a bug report for perl from sferencik [at] gmail,
> > generated with the help of perlbug 1.35 running under perl v5.8.5.
> >
> >
> > I'm installing Storable 2.30. Here are some observations from
> > t/code.t:
> >
> > 1) I get test failures when freezing/thawing Test::More::ok:
> >
>
> Perl 5.8.5 is no longer supported. Can you try this with the current
> supported version of Perl, 5.14.2? If you install that, you will
> probably also get Storable version 2.34 along with it.

In any case, the tests for the CPAN Storable distribution shouldn’t be
making unsafe assumptions.

--

Father Chrysostomos


---
via perlbug: queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=111936


perlbug-followup at perl

Mar 24, 2012, 9:39 AM

Post #3 of 4 (111 views)
Permalink
[perl #111936] Storable - storing 'code' test failure [In reply to]

On Sat Mar 24 09:38:15 2012, sprout wrote:
> On Fri Mar 23 18:04:54 2012, jkeenan wrote:
> > On Thu Mar 22 07:59:46 2012, samuel.ferencik [at] barclays wrote:
> > > This is a bug report for perl from sferencik [at] gmail,
> > > generated with the help of perlbug 1.35 running under perl v5.8.5.
> > >
> > >
> > > I'm installing Storable 2.30. Here are some observations from
> > > t/code.t:
> > >
> > > 1) I get test failures when freezing/thawing Test::More::ok:
> > >
> >
> > Perl 5.8.5 is no longer supported. Can you try this with the current
> > supported version of Perl, 5.14.2? If you install that, you will
> > probably also get Storable version 2.34 along with it.
>
> In any case, the tests for the CPAN Storable distribution shouldn’t be
> making unsafe assumptions.
>

Also, I don’t think the lack of support for 5.8.x (in the sense of there
being new maintenance releases coming) should affect the support of CPAN
modules for existing 5.8.x distributions. This ticket is, of course
about the CPAN distribution, for which blead is upstream.

--

Father Chrysostomos


---
via perlbug: queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=111936


samuel.ferencik at barclays

Apr 23, 2012, 2:36 AM

Post #4 of 4 (99 views)
Permalink
RE: [perl #111936] Storable - storing 'code' test failure [In reply to]

> Actually, I can’t reproduce this at all. The t/code.t that comes with
> Storable 2.30 doesn’t try to freeze Test::More::ok at all. So I can
> only ask where this distribution came from. And was it really 2.30?

It is Storable 2.30 from CPAN. Are you running it on Perl 5.8.5 on Linux? (I've also tried 5.8.8 on both Linux and Windows, and t/code.t passed.)

Here is how I'm running it; the failure is reproducible consistently:

.../src$ perl t/code.t
1..63
ok 1
ok 2
...
ok 42
ok 43
Variable "$Test" is not imported at (eval 79) line 5.
not ok 44
# Failed test (t/code.t at line 269)
# got: 'code sub ($;$) {
# package Test::More;
# use strict 'refs';
# my($test, $name) = @_;
# $Test->ok($test, $name);
# } caused an error: Global symbol "$Test" requires explicit package name at (eval 79) line 5, at t/code.t line 268
# '
# expected: ''
not ok 45
# Failed test (t/code.t at line 272)
not ok 46
# Failed test (t/code.t at line 272)
not ok 47
# Failed test (t/code.t at line 272)
not ok 48
# Failed test (t/code.t at line 272)
not ok 49
# Failed test (t/code.t at line 272)
ok 50
ok 51
...
ok 62
ok 63
# Looks like you failed 6 tests of 63.

My version of code.t has this:

56 @obj =
57 ([.\&code, # code reference
58 sub { 6*7 },
59 $blessed_code, # blessed code reference
60 \&Another::Package::foo, # code in another package
61 sub ($$;$) { 0 }, # prototypes
62 sub { print "test\n" },
63 \&Test::More::ok, # large scalar
64 ],
...
267 $freezed = freeze $obj[0];
268 eval { $thawed = thaw $freezed };
269 is($@, "");

Test::More::ok is frozen as $obj[0]->[6] on line 267, and the subsequent thawing fails on line 269.

Is your source different?

Sam

_______________________________________________

This e-mail may contain information that is confidential, privileged or otherwise protected from
disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute
it by any means. Please delete it and any attachments and notify the sender that you have received
it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a
solicitation to buy or sell any securities, investment products or other financial product or
service, an official confirmation of any transaction, or an official statement of Barclays. Any
views or opinions presented are solely those of the author and do not necessarily represent those
of Barclays. This e-mail is subject to terms available at the following link: www.barcap.com/emaildisclaimer.
By messaging with Barclays you consent to the foregoing. Barclays offers premier investment banking
products and services to its clients through Barclays Bank PLC, a company registered in England
(number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP. This email may
relate to or be sent from other members of the Barclays Group.

_______________________________________________

Perl porters RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.