[Rt-commit] r5579 - in Data-Defer: . t
audreyt at bestpractical.com
audreyt at bestpractical.com
Mon Jul 17 14:07:35 EDT 2006
Author: audreyt
Date: Mon Jul 17 14:07:34 2006
New Revision: 5579
Added:
Data-Defer/lib/Data/Defer.pm
- copied, changed from r5578, /Data-Defer/lib/Data/Thunk.pm
Removed:
Data-Defer/lib/Data/Thunk.pm
Modified:
Data-Defer/MANIFEST
Data-Defer/Makefile.PL
Data-Defer/t/01-basic.t
Log:
* 0.02.
Modified: Data-Defer/MANIFEST
==============================================================================
--- Data-Defer/MANIFEST (original)
+++ Data-Defer/MANIFEST Mon Jul 17 14:07:34 2006
@@ -1,3 +1,4 @@
+Changes
inc/Module/Install.pm
inc/Module/Install/Base.pm
inc/Module/Install/Can.pm
@@ -11,7 +12,7 @@
inc/Test/Builder.pm
inc/Test/Builder/Module.pm
inc/Test/More.pm
-lib/Data/Thunk.pm
+lib/Data/Defer.pm
Makefile.PL
MANIFEST This list of files
META.yml
Modified: Data-Defer/Makefile.PL
==============================================================================
--- Data-Defer/Makefile.PL (original)
+++ Data-Defer/Makefile.PL Mon Jul 17 14:07:34 2006
@@ -1,9 +1,9 @@
use strict;
use inc::Module::Install;
-name 'Data-Thunk';
+name 'Data-Defer';
license 'MIT';
-all_from 'lib/Data/Thunk.pm';
+all_from 'lib/Data/Defer.pm';
requires 'Class::InsideOut';
requires 'Exporter::Lite';
Copied: Data-Defer/lib/Data/Defer.pm (from r5578, /Data-Defer/lib/Data/Thunk.pm)
==============================================================================
--- /Data-Defer/lib/Data/Thunk.pm (original)
+++ Data-Defer/lib/Data/Defer.pm Mon Jul 17 14:07:34 2006
@@ -18,14 +18,14 @@
&{$_defer{ id $_[0] }}
}
-sub lazy (&) {
+sub defer (&) {
my $cv = shift;
my $obj = register( bless \(my $s), __PACKAGE__ );
$_defer{ id $obj } = $cv;
return $obj;
}
-sub defer (&) {
+sub lazy (&) {
my $cv = shift;
my ($value, $forced);
my $obj = register( bless \(my $s), __PACKAGE__ );
Modified: Data-Defer/t/01-basic.t
==============================================================================
--- Data-Defer/t/01-basic.t (original)
+++ Data-Defer/t/01-basic.t Mon Jul 17 14:07:34 2006
@@ -6,6 +6,6 @@
my $l = lazy { ++$y };
is($d, $l, "1 == 1");
-is($d, 2, "lazy is now 2");
-is($l, 1, "but thunk stays at 1");
+is($d, 2, "defer is now 2");
+is($l, 1, "but lazy stays at 1");
isnt($d, $l, "3 != 1");
More information about the Rt-commit
mailing list