Skip to content

Commit

Permalink
lesser renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
DrHyde committed Oct 29, 2022
1 parent 478bcba commit 80cc3f7
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ GPL2.txt
MANIFEST.SKIP
lib/Devel/Deprecations/Environmental.pm
lib/Devel/Deprecations/Environmental/Plugin/OldPerl.pm
lib/Devel/Deprecations/Environmental/Plugin/Bits32.pm
t/lib/Devel/Deprecations/Environmental/Plugin/Internal/Bits64.pm
lib/Devel/Deprecations/Environmental/Plugin/Int32.pm
t/lib/Devel/Deprecations/Environmental/Plugin/Internal/Int64.pm
t/lib/Devel/Deprecations/Environmental/Plugin/Internal/Never.pm
t/lib/Devel/Deprecations/Environmental/Plugin/Internal/Always.pm
t/32-bit.t
Expand Down
8 changes: 4 additions & 4 deletions lib/Devel/Deprecations/Environmental.pm
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ A framework for managing deprecations of the environment in which your code runs
=head1 SYNOPSIS
This will load the Devel::Deprecations::Environmental::Plugin::Bits32 plugin and emit a
This will load the Devel::Deprecations::Environmental::Plugin::Int32 plugin and emit a
warning if running on a 32 bit system:
use Devel::Deprecations::Environmental qw(Bits32);
use Devel::Deprecations::Environmental qw(Int32);
This will start warning about an impending deprecation on the 1st of February
2023, upgrade that to a warning about being unsupported on the 1st of February
2024, and upgrade that to a fatal error on the 1st of February 2025:
use Devel::Deprecations::Environmental
Bits32 => {
Int32 => {
warn_from => '2023-02-01',
unsupported_from => '2024-02-01',
fatal_from => '2025-02-01',
Expand All @@ -39,7 +39,7 @@ This will always warn about 32 bit perl or a really old perl:
use Devel::Deprecations::Environmental
OldPerl => { older_than => '5.14.0', },
'Bits32';
'Int32';
=head1 DEPRECATION ARGUMENTS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package Devel::Deprecations::Environmental::Plugin::Bits32;
package Devel::Deprecations::Environmental::Plugin::Int32;

use strict;
use warnings;
Expand All @@ -9,15 +9,15 @@ our $VERSION = '1.000';

=head1 NAME
Devel::Deprecations::Environmental::Plugin::Bits32
Devel::Deprecations::Environmental::Plugin::Int32
=head1 DESCRIPTION
A plugin for L<Devel::Deprecations::Environmental> to emit warnings when perl has 32-bit integers
=head1 SYNOPSIS
use Devel::Deprecations::Environmental qw(Bits32);
use Devel::Deprecations::Environmental qw(Int32);
=head1 AUTHOR, LICENCE and COPYRIGHT
Expand Down
2 changes: 1 addition & 1 deletion t/32-bit.t
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use lib 't/lib';
my @warnings;
$SIG{__WARN__} = sub { @warnings = @_ };

Devel::Deprecations::Environmental->import('Bits32');
Devel::Deprecations::Environmental->import('Int32');
if(~0 != 4294967295) { # BUG! But what about 128-bit perl!
is(scalar(@warnings), 0, "didn't gripe about this 64-bit machine being 32-bit");
} else {
Expand Down
2 changes: 1 addition & 1 deletion t/64-bit.t
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use lib 't/lib';
my @warnings;
$SIG{__WARN__} = sub { @warnings = @_ };

Devel::Deprecations::Environmental->import('Internal::Bits64');
Devel::Deprecations::Environmental->import('Internal::Int64');
if(~0 == 4294967295) {
is(scalar(@warnings), 0, "didn't gripe about this 32-bit machine being 64-bit");
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package Devel::Deprecations::Environmental::Plugin::Internal::Bits64;
package Devel::Deprecations::Environmental::Plugin::Internal::Int64;

use strict;
use warnings;
Expand Down
4 changes: 2 additions & 2 deletions t/multi.t
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ my $future_perl = sprintf("%d.%d.%d", $parts[0], $parts[1] + 2, 0);
@warnings = ();
Devel::Deprecations::Environmental->import(
# these two always warn
((~0 != 4294967295) ? 'Internal::Bits64' : 'Bits32'),
((~0 != 4294967295) ? 'Internal::Int64' : 'Int32'),
OldPerl => { older_than => $future_perl },
# this one never warns
((~0 == 4294967295) ? 'Internal::Bits64' : 'Bits32'),
((~0 == 4294967295) ? 'Internal::Int64' : 'Int32'),
);
is(scalar(@warnings), 2, "got 2 warnings");
like(
Expand Down

0 comments on commit 80cc3f7

Please sign in to comment.