in reply to Re^2: Pragma clash across modules: bignum and Math::BigFloat (hinthash)
in thread Pragma clash across modules: bignum and Math::BigFloat

Pragmas are named in all lowercase.
But not everything that is named in all lowercase is a pragma. Take use lib, for instance. Not a pragma; it globally changes @INC. bignum tried to be a pragma, but gave up halfway.
  • Comment on Re^3: Pragma clash across modules: bignum and Math::BigFloat (hinthash)

Replies are listed 'Best First'.
Re^4: Pragma clash across modules: bignum and Math::BigFloat (hinthash)
by LanX (Saint) on Dec 07, 2016 at 23:06 UTC
    The definition is indeed fuzzy.

    But in the case of lib I'd opt for pragma because it's a compile time effect and the globality is intended.

    > bignum tried to be a pragma, but gave up halfway.

    I agree.

    For instance a Tie::Scalar on $upgrade and $downgrade to a routine checking the hinthash could do without even changing BigFloat and family.

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

      The problem is that bignum is arcane and weird. Your solution is to make it more arcane and weird. IMO the right solution is to make it less arcane and weird: just have it convert all numbers to BigFloats. All this upgrading and downgrading between BigInts and BigFloats is a silly waste of time.
        > Your solution is to make it more arcane and weird.

        My "solution" is one possible workaround to fix legacy code, involving hinthashes like documented in perlpragma

        You on the other side don't provide any solution.

        You just say don't use this and consequently other selfmade pragmas.

        Cheers Rolf
        (addicted to the Perl Programming Language and ☆☆☆☆ :)
        Je suis Charlie!