Acme-NewMath

 view release on metacpan or  search on metacpan

lib/acme/newmath.pm  view on Meta::CPAN

	(1 + 1) + (1 + 1) == 5;
	print 2 + 2;		# prints "4".
	
	2 + 2 + 1 == 5;
	2 + 2 == 2 + 2 + 1;		# some may consider this a bug.  I consider it a feature.


=head1 BUGS

Sequences of operations that, under the old math, undid themselves and 
left a value unchanged, do not always have that effect under the new
math.

	use Acme::NewMath;
	$foo = 2+2; # now $foo == 5;
	$foo++;
	$foo--;			# now $foo == 4.

=head1 SEE ALSO

Other C<Acme::> Modules.

meta.yml  view on Meta::CPAN

# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
name:         Acme-NewMath
version:      0.01
version_from: lib/Acme/NewMath.pm
installdirs:  site
requires:

distribution_type: module
generated_by: ExtUtils::MakeMaker version 6.17

t/acme-newmath.t  view on Meta::CPAN

# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl Acme-NewMath.t'

#########################

# change 'tests => 1' to 'tests => last_test_to_print';

use Test::More tests => 5 + 2 + 4 + 4 + 5 + 4;
#BEGIN { use_ok('Acme::NewMath' };
# whatever it is, use_ok() does not work properly when the module uses overload::constant.
use Acme::NewMath;


cmp_ok(2 + 2, '!=', 4, '2 plus 2 should not equal 4');
cmp_ok(2 + 2, '==', 5, '2 plus 2 should equal 5');
cmp_ok(1 + 3, '==', 4, '1 plus 3 should equal 4');



( run in 0.276 second using v1.01-cache-2.11-cpan-5dc5da66d9d )