Acme-Lvalue
view release on metacpan or search on metacpan
Revision history for Acme-Lvalue
0.03 2012-10-21
Skip failing tests under threaded perls.
0.02 2012-10-20
First version, released on an unsuspecting world.
t/readonly.t view on Meta::CPAN
#!perl
use warnings FATAL => 'all';
use strict;
use Config;
use Test::More
$Config{usethreads}
? (skip_all => q{read-only constants aren't read-only under threads})
: (tests => 3);
use Acme::Lvalue qw(:builtins), [succ => sub { $_[0] + 1 }, sub { $_[0] - 1 }];
ok !eval { succ(0) = 1; 1 };
ok !eval { sqrt(succ(0)) = 2; 1 };
ok !eval { succ(sqrt(0)) = 3; 1 };
( run in 0.256 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )