Moose-Autobox-0.12 #269

Closed
celogeek opened this Issue Mar 31, 2012 · 4 comments

Comments

Projects
None yet
2 participants
@celogeek

it failed on dies_ok

perl  -Iblib -Ilib t/003_p6_example.t 
TAP version 13
1..8
ok 1 - use Moose::Autobox;
ok 2 - ... got 5 bytes
ok 3 - ... got 5 kilobytes
ok 4 - ... got 2 megabytes
ok 5 - ... got 1 gigabyte
ok 6 - ... got 2 terabyte
not ok 7 - ... cannot do the autoboxing lexically
#   Failed test '... cannot do the autoboxing lexically'
#   at t/003_p6_example.t line 43.
not ok 8 - ... no longer got 5 bytes
#   Failed test '... no longer got 5 bytes'
#   at t/003_p6_example.t line 57.
#2 tests of 8 failed.
@celogeek

This comment has been minimized.

Show comment Hide comment
@celogeek

celogeek Mar 31, 2012

the use_ok has changed, so this doesn't act the same :

BEGIN {
 use Moose::Autobox;
}

And

BEGIN {
 use_ok 'Moose::Autobox';
}

the use_ok has changed, so this doesn't act the same :

BEGIN {
 use Moose::Autobox;
}

And

BEGIN {
 use_ok 'Moose::Autobox';
}
@schwern

This comment has been minimized.

Show comment Hide comment
@schwern

schwern Apr 10, 2012

Member

This is a result of the changes to use_ok to make it apply lexical effect. Previously use_ok would not apply the autoboxing, now it does, and this has changed the presumptions of the test script.

We're discussing whether that feature should be reverted.

BEGIN { use Moose::Autobox } is redundant and can be replaced with just use Moose::Autobox. For the purposes of fixing the Moose::Autobox test it should be replaced with a require_ok as the test does not want autoboxing on for the whole script, just in select scopes. Whether or not use_ok is changed, this is the correct choice.

Member

schwern commented Apr 10, 2012

This is a result of the changes to use_ok to make it apply lexical effect. Previously use_ok would not apply the autoboxing, now it does, and this has changed the presumptions of the test script.

We're discussing whether that feature should be reverted.

BEGIN { use Moose::Autobox } is redundant and can be replaced with just use Moose::Autobox. For the purposes of fixing the Moose::Autobox test it should be replaced with a require_ok as the test does not want autoboxing on for the whole script, just in select scopes. Whether or not use_ok is changed, this is the correct choice.

@schwern

This comment has been minimized.

Show comment Hide comment
@schwern

schwern Apr 13, 2012

Member

Moose::Autobox has a patch for this. https://rt.cpan.org/Ticket/Display.html?id=76183

Member

schwern commented Apr 13, 2012

Moose::Autobox has a patch for this. https://rt.cpan.org/Ticket/Display.html?id=76183

@schwern

This comment has been minimized.

Show comment Hide comment
@schwern

schwern May 1, 2012

Member

The use_ok patch which caused this problem has been rolled back, so this is no longer a problem.

Member

schwern commented May 1, 2012

The use_ok patch which caused this problem has been rolled back, so this is no longer a problem.

@schwern schwern closed this May 1, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment