Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-MockModule CPAN distribution.

Report information
The Basics
Id: 16872
Status: resolved
Priority: 0/
Queue: Test-MockModule

People
Owner: GFRANKS [...] cpan.org
Requestors: larry [...] theclapp.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.05
Fixed in: 0.06



Subject: Documenation incorrect: "The following statements are equivalent:..."
Test::MockModule, v0.05, Perl version 5.8.7, Linux 2.6, Debian 'stable'/'testing' mix. The manpage says -- quote -- The following statements are equivalent: [...] $module->mock(updated => [localtime()]); $module->mock(updated => sub { return [localtime()]}); -- endquote -- That's not true. Using updated => [localtime()] will return the same array reference every time you call it (and the same values for localtime), whereas using sub { [localtime()] } will return a different array reference each time, and moreover will return the current time each time you call it. -- Larry Clapp larry@theclapp.org
On Mon Jan 02 15:42:58 2006, guest wrote: Show quoted text
> Test::MockModule, v0.05, Perl version 5.8.7, Linux 2.6, Debian > 'stable'/'testing' mix. > > The manpage says > > -- quote -- > The following statements are equivalent: > > [...] > > $module->mock(updated => [localtime()]); > $module->mock(updated => sub { return [localtime()]}); > -- endquote -- > > That's not true. Using > > updated => [localtime()] > > will return the same array reference every time you call it (and the > same values for localtime), whereas using > > sub { [localtime()] } > > will return a different array reference each time, and moreover will > return the current time each time you call it. > > -- Larry Clapp > larry@theclapp.org
I've updated the docs to address this in my fork of Test::MockModule on github: https://github.com/geofffranks/test-mockmodule
Deployed the documentation update for this in v0.06 of Test::MockModule