in reply to Re^3: Should I use carp/croak or warn/die
in thread Should I use carp/croak or warn/die

I agree that PHPisms like 500 extra, semi-overlapping keywords can be a bad thing but I've always liked Carp's interface. Taking the generalized and parameterized route to extremes is warn and die becoming replaced with error($level, $message) or something. I use Carp's functions enough, including longmess and shortmess for logs, that I much prefer having specific functions for acking around and such.

Replies are listed 'Best First'.
Re^5: Should I use carp/croak or warn/die
by LanX (Saint) on May 30, 2018 at 17:27 UTC
    I'm fine with Huffman* coding keywords (often used = own keyword) and naming functions is indeed difficult ...

    But I'm still not happy, sorry ! :)

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

    update

    PS: any need to explain MilliHuffman? ;-)

      I liked some of your thoughts about "nice to haves" above and I'm always open to new approaches even though I've never met Ms Huffman. I propose some replacements/aliases–

      carp ⇢ gripe
      cluck ⇢ kvetch
      croak ⇢ lament
      confess ⇢ dirge
      shortmess ⇢ demur
      longmess ⇢ expostulate

      Now we're getting somewhere. I am seeing an Acme:: future here; especially if it duplicates every single function in the core and in common usage from the more popular CPAN modules, with the entire thesaurus entry for each! :P ← You can't stop me!

        Rather two additional generic functions which are synonymous to this range of things you like to do with Ms Milli. ;p

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

        "...seeing an Acme:: future here..."

        Great expectations. I guess putting something like use Carp; sub lament { goto &croak } in a role should do the job (untested).

        Best regards, Karl

        «The Crux of the Biscuit is the Apostrophe»

        perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help