lancew / Scientist

Perl 5 Scientist - Test new code against old

Home Page:https://metacpan.org/release/Scientist

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clean the namespace

lancew opened this issue · comments

As raspass mentioned, Usage: Time::HiRes::time() is now unintentionally a method of Scientist.

So $experiment->time;

This would produce something like "Usage: Time::HiRes::time()"

Propose: use namespace::clean; ?

works for me.

Just pushed a branch with the above proposed solution (and a not terribly clever test).

This works. For the testing, what do you think about:

ok(! $CLASS->can("time"), 'should not have time()');

WebDriver::Tiny has a super simple, yet exhaustive, namespace test - https://github.com/cv-library/WebDriver-Tiny/blob/master/t/namespace.t

Pushed a new commit... 5962bf5