Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^3: use utf8 pragma with moo

by Corion (Patriarch)
on Jan 15, 2022 at 08:50 UTC ( [id://11140467]=note: print w/replies, xml ) Need Help??


in reply to Re^2: use utf8 pragma with moo
in thread use utf8 pragma with moo

The "problem" with Moo is that it re-enables all warnings that you previously disabled.

So a solution is to disable warnings after the use Moo; line:

use utf8; use feature qw(signatures); use Moo; no warnings qw(experimental::signatures);

Replies are listed 'Best First'.
Re^4: use utf8 pragma with moo
by syphilis (Archbishop) on Jan 15, 2022 at 13:47 UTC
    The "problem" with Moo is that it re-enables all warnings that you previously disabled

    That's odd ... why has the right to "Do What I Don't Mean" been bestowed upon Moo, when that sort of thing is generally frowned upon ?

    Thankfully, I don't use Moo and have no interest in it.
    However, I have just installed it to verify that it actually has this most unperlish capability ... and it does !!
    What's the spin that validates this ?

    Cheers,
    Rob

      I think the spin is that this is an improvement over Moo v1, which made all warnings fatal...

      I like Moo for its simplicity and disable all unwanted warnings (that is, experimental::signatures afterwards), but yes, it's inconvenient.

        I think that if I wrote a module that clobbered the users intentions like that, and someone suggested to me that it really ought not do that, then I would have to agree.
        (Though, as is widely known, I have a tendency to agree all too readily ;-)

        At least the workaround (as given earlier) is an easy and straightforward one.

        Cheers,
        Rob
Re^4: use utf8 pragma with moo
by AlexP (Pilgrim) on Jan 15, 2022 at 08:58 UTC
    Huh! Thanks for enlightenment!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11140467]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-25 06:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found