Skip to content

Implicit indirect dependency in test.t #1

@kentfredric

Description

@kentfredric

I struck some anomaly today in this, and I was looking at this line in test.t wondering how it worked:

Email-Date/t/test.t

Lines 8 to 10 in f197839

my $time = time;
my $date = Time::Local::timelocal Date::Parse::strptime format_date($time);
cmp_ok($date, '==', $time, 'format_date output was parsed back into input');

Given there is no use Time::Local anywhere in Email-Date.

A bit of digging and it turns out you're relying on Date::Parse to load it for you:
https://metacpan.org/release/TimeDate/source/lib/Date/Parse.pm#L10

So although it currently works, this dependency might be fragile as is without a proper use declaration, and probably an explicit TEST_REQUIRES dep. ( And it makes for better metadata either way for sec/audit/tooling reasons )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions