-
Notifications
You must be signed in to change notification settings - Fork 551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
warnings isn't futureproofed against future category declaration #12101
Comments
From Perl@ResonatorSoft.orgCreated by Perl@ResonatorSoft.orgIt looks like warnings will fatally error with flags for future Unknown warnings category 'non_unicode' This makes it rather hard to use any of the newer categories Perl Info
|
From @cpansproutOn Mon May 14 05:30:47 2012, Perl@ResonatorSoft.org wrote:
But what do we do if someone mistypes a warnings category? I’m not trying to suggest that your concern is not valid. It *is* a We also have a problem with custom-registered warnings categories. (See It should be possible for someone to say ‘use warnings "foo"’, before Now, if such a foo module never registers itself, or was actually called If we do have a warning, then disabling it would be weird: no warnings "warnings"; # warnings about misuse of warnings.pm Or: BEGIN { So, it looks to me as though, while it’s nice to have a typo check, it -- Father Chrysostomos |
The RT System itself - Status changed from 'new' to 'open' |
From tchrist@perl.com"Father Chrysostomos via RT" <perlbug-followup@perl.org> wrote
Is this a reason to have use if $] >= 5.014, warnings => "non_unicode"; Do I dare floating-point there, or should that be doing some $^V dance? if $^V >= v5.11.3, qw[ feature unicode_strings ]; Which I hope will work. I'm a bit fuzzy on v-strings and versioning, --tom |
From @cpansproutOn Thu May 17 13:34:54 2012, tom christiansen wrote:
That’s a good used of if.pm that I hadn’t thought of.
Since 5.10, $^V can be used with either ge or >= with either vstring or In 5.6 and 5.8, -- Father Chrysostomos |
From zefram@fysh.orgTom Christiansen wrote:
The floating point will work fine. On sufficiently recent perls, $] On older perls, however, $] had a numeric value that was built up using use if "$]" >= 5.014, warnings => "non_unicode"; -zefram |
From Perl@ResonatorSoft.orgOn Fri, May 18, 2012 at 9:05 AM, Zefram via RT
Steering this report back on topic, the warnings items could have some use warnings "v5.14-non_unicode" Then "earlier" versions of warnings could parse that and ignore it if My current workaround is checking %warnings::Offsets, which is kinda -- |
From belg4mit@pthbb.orgCreated by belg4mit@pthbb.orgwarnings croaks if it is given an unrecognized category. For instance, Curses::UI previously (now fixed, but the unfixed no warnings 'illegalproto'; can disable this warning, in 5.12+, but causes earlier versions BEGIN{ if( $^V lt v5.12.0 ){ Unfortunately a true fix for this issue may be difficult to fix in a Perl Info
|
Migrated from rt.perl.org#112920 (status was 'open')
Searchable as RT112920$
The text was updated successfully, but these errors were encountered: