Upstream software project

perl-Test-MockDateTime

Mock Datetime->Now Calls During Tests

About perl-Test-MockDateTime

Mock Datetime->Now Calls During Tests

This project links 3 native package records across 3 recorded operating-system releases. Compare the retained versions and architectures below, then open the package for your own release.

These are catalog observations, not a guarantee of installation, compatibility, or upstream support.

Project pictures and package coverage

openSUSE Leap 15.6: 1 package records; openSUSE Leap 16.0: 1 package records; openSUSE Tumbleweed: 1 package records. Catalog coverage diagram, not an application screenshot.perl-Test-MockDateTime: recorded package coverageopenSUSE Leap 15.61 recordsopenSUSE Leap 16.01 recordsopenSUSE Tumbleweed1 records
OpenFactory diagram of linked package records. It is not an application screenshot.

Project identity

Project
perl-Test-MockDateTime
Publisher
Not authoritatively mapped
Native package records
3
Operating systems
opensuse-leap-15-6, opensuse-leap-16-0, opensuse-tumbleweed
License expression
Artistic-1.0 or GPL-1.0+
Source repository
Not reported

Source-reported description

The fullest retained description is shown with its source. Distribution packaging descriptions may include downstream details.

Getting the current time sometimes is not very helpful for testing scenarios. Instead, if you could obtain a known value during the runtime of a testcase will make your results predictable. Why another Date Mocker? I wanted something simple with a very concise usage pattern and a mocked date should only exist and stay constant inside a scope. After leaving the scope the current time should be back. This lead to this tiny module. This simple module allows faking a given date and time for the runtime of a subsequent code block. By default the 'on' keyword is exported into the namespace of the test file. The date to get mocked must be in a format that is recognized by DateTime::Format::DateParse. on '2013-01-02 03:04:05', sub { ... }; is basically the same as { my $now = DateTime::Format::DateParse->parse_datetime( '2013-01-02 03:04:05' ); local *DateTime::now = sub { $now->clone }; ... everything from code block above } A drawback when relying on this module is that you must know that the module you are testing uses 'DateTime->now' to obtain the current time. =cut

Description source

Packages by operating system

Compare recorded versions, then open a package for dependency, file, checksum, and repository evidence. Version strings are distribution-specific, not a ranking of newer software.

openSUSE Leap 15.6

  1. Package perl-Test-MockDateTime

    leap-15.6 (openSUSE Leap 15.6) (Development/Libraries/Perl): Mock Datetime->Now Calls During Tests

    0.02-bp156.2.1: noarch

    Source: perl-Test-MockDateTime

openSUSE Leap 16.0

  1. Package perl-Test-MockDateTime

    leap-16.0 (openSUSE Leap 16.0) (Development/Libraries/Perl): Mock Datetime->Now Calls During Tests

    0.02-bp160.1.11: noarch

    Source: perl-Test-MockDateTime

openSUSE Tumbleweed

  1. Package perl-Test-MockDateTime

    tumbleweed (openSUSE Tumbleweed) (Development/Libraries/Perl): Mock Datetime->Now Calls During Tests

    0.02-1.28: noarch

    Source: perl-Test-MockDateTime

Project resources and further reading

Mapping provenance

Only source-backed identity signals create public cross-OS links. A reviewer can later approve or dispute an inferred relationship without rewriting native package history.

No field-level source record is published yet.