in reply to Prototype Mismatch Errors

Update: LanX's seems | is the better answer. Don't bother with the rest of this.

I understand this is because these functions are begin declared multiple times?

c:\@Work\Perl\monks>perl -wMstrict -le "BEGIN { sub Dumper (); } ;; use Data::Dumper; " Prototype mismatch: sub main::Dumper () vs none at C:/Perl/lib/Exporte +r.pm line 67. at -e line 1 c:\@Work\Perl\monks>perl -wMstrict -le "BEGIN { sub Dumper; } ;; use Data::Dumper; "
From this, it seems you may be right. But that prompts the question, "Why are you 'begin declaring' subroutines at all?" Can you show a Short, Self-Contained, Correct Example of such declarations that represents what is in your code (and produces the same error message)?


Give a man a fish:  <%-{-{-{-<

Replies are listed 'Best First'.
Re^2: Prototype Mismatch Errors
by pryrt (Abbot) on Aug 07, 2018 at 20:20 UTC

    AnomalousMonk, excepting line numbers, the OP code does produce those messages for me. As LanX said, it's a conflict on importing the same subroutines from POSIX and Date::Format. This can be seen with perl -MPOSIX -MDate::Format -e 1, which also produces those messages

    (edit: add links)

    (edit 2: sorry, you updated after I started this reply...)

      ... OP code does produce those messages ...

      I belatedly noticed the OPed code was, in fact, an SSCCE. I think it was the word "snippet" that got me onto the wrong track. :)


      Give a man a fish:  <%-{-{-{-<