in reply to Prototype Mismatch Errors

> What is the best way to fix these warnings without having to go through the whole code?

Looks like two modules are exporting these equally named functions by default, you should definitely decide which one you prefer and block the others!

Date::Format is one of them, POSIX the other one.

> Is it even possible?

Depends on the modules, look into the documentation, normally you say something like use Module qw(func1 func2); to restrict your selection. See use ...

HTH!

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Replies are listed 'Best First'.
Re^2: Prototype Mismatch Errors
by haukex (Archbishop) on Aug 08, 2018 at 10:43 UTC

    mavericknik: I completely agree with LanX's advice. Depending on whether you want POSIX::strftime or Date::Format::strftime, you could either:

    use Date::Format qw/time2str ctime asctime/; # everything except strf +time

    (See the source for the default @EXPORT list.) And from POSIX:

    Everything is exported by default (with a handful of exceptions). This is an unfortunate backwards compatibility feature and its use is strongly discouraged. You should either prevent the exporting (by saying use POSIX ();, as usual) and then use fully qualified names (e.g. POSIX::SEEK_END), or give an explicit import list. If you do neither and opt for the default (as in use POSIX;), you will import hundreds and hundreds of symbols into your namespace.

    So following this advice from the documentation is something I'd recommend regardless.

    Update: Clarified last sentence.