Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Revision history for Syntax-Construct

1.042 2025-06-13
- Add sig-warn-obj

1.041 2025-06-09
- Add the __FILE__() syntax

Expand Down
10 changes: 7 additions & 3 deletions lib/Syntax/Construct.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use 5.006002;
use strict;
use warnings;

our $VERSION = '1.041';
our $VERSION = '1.042';

my %introduces = do { no warnings 'qw';
( '5.040' => [qw[
Expand Down Expand Up @@ -59,7 +59,7 @@ my %introduces = do { no warnings 'qw';
'5.014' => [qw[
?^ /r /d /l /u /a auto-deref
^GLOBAL_PHASE \o package-block
srand-return prototype+
srand-return prototype+ sig-warn-obj
]],
'5.012' => [qw[
package-version ... each-array
Expand Down Expand Up @@ -305,7 +305,7 @@ Syntax::Construct - Explicitly state which non-feature constructs are used in th

=head1 VERSION

Version 1.041
Version 1.042

=head1 SYNOPSIS

Expand Down Expand Up @@ -638,6 +638,10 @@ See B<srand() now returns the seed> under L<perl5140delta/Other Enhancements>.

See L<perl5140delta/Single-term-prototype>.

=head3 sig-warn-obj

See the second bullet in L<perl5140delta/Exception Handling>.

=head2 5.016

=head3 charnames
Expand Down
9 changes: 9 additions & 0 deletions t/02-constructs.t
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,15 @@ my %tests = (
[ 'prototype+',
'sub proto_plus (+) { $_[0][0] }; my @ar = qw( a b ); proto_plus(@ar)',
'a' ],
[ 'sig-warn-obj',
'sub My::Warn::value { 42 }
my $out;
my $w = bless {}, "My::Warn";
local $SIG{__WARN__} = sub { $out = shift->value };
warn $w;
$out',
42
],
],

'5.012' => [
Expand Down
2 changes: 1 addition & 1 deletion t/05-functions.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use FindBin;

my %count;
BEGIN {
%count = (constructs => 102, old => 4, removed => 7);
%count = (constructs => 103, old => 4, removed => 7);
}

use Test::More tests => 5;
Expand Down
2 changes: 1 addition & 1 deletion xt/completness.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use FindBin;

my $plan;
BEGIN {
my %count = (constructs => 102,
my %count = (constructs => 103,
removed => 7,
aliases => 80,
old => 4);
Expand Down
Loading