Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: use utf8 pragma with moo

by AlexP (Pilgrim)
on Jan 15, 2022 at 08:46 UTC ( [id://11140466]=note: print w/replies, xml ) Need Help??


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

Thank you very much for "warn Dumper sort keys %INC" - this is brilliant.

The problem with namespace:

use utf8; use feature qw(signatures); no warnings qw(experimental::signatures); use Moo; use namespace::clean; sub BUILD($self) { $self->_set_count(1); }

An error: "The signatures feature is experimental ..."

Should I place no warnings after namespace::clean or there are other solutions? Maybe with namespace::clean -except?

Replies are listed 'Best First'.
Re^3: use utf8 pragma with moo
by Corion (Patriarch) on Jan 15, 2022 at 08:50 UTC

    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);
      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.

      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://11140466]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-04-26 00:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found