Skip to content

Commit

Permalink
Updates broken regex
Browse files Browse the repository at this point in the history
The `{,MAX}` quantifier appears to have been broken until v5.33.6, which
is what MinimumPerl was picking up on. This uses `{0,2}` to work-around
it.
  • Loading branch information
reyjrar committed Jun 20, 2024
1 parent fe1b740 commit 403cddd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.mkdn
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Parse::Syslog::Line - Simple syslog line parser

# VERSION

version 5.2
version 5.3

# SYNOPSIS

Expand Down
2 changes: 1 addition & 1 deletion cpanfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ on 'test' => sub {

on 'configure' => sub {
requires "ExtUtils::MakeMaker" => "0";
requires "perl" => "5.014";
requires "perl" => "v5.14.0";
};

on 'develop' => sub {
Expand Down
1 change: 0 additions & 1 deletion dist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ DateTime = >= 1.23
DateTime::TimeZone = >= 2.13
[RecommendedPrereqs]
[MinimumPerl]
perl = 5.014
[CheckPrereqsIndexed]

[VersionFromModule]
Expand Down
4 changes: 2 additions & 2 deletions lib/Parse/Syslog/Line.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use Module::Loaded qw( is_loaded );
use POSIX qw( strftime tzset );
use Ref::Util qw( is_arrayref );

our $VERSION = '5.2';
our $VERSION = '5.3';

# Default for Handling Parsing
our $DateParsing = 1;
Expand Down Expand Up @@ -183,7 +183,7 @@ our %EXPORT_TAGS = (
# Regex to Extract Data
const my %RE => (
IPv4 => qr/(?>(?:[0-9]{1,3}\.){3}[0-9]{1,3})/,
preamble => qr/^\<(\d+)\>(\d{,2})\s*/,
preamble => qr/^\<(\d+)\>(\d{0,2})\s*/,
year => qr/^(\d{4}) /,
date => qr/(?<date>[A-Za-z]{3}\s+[0-9]+\s+[0-9]{1,2}(?:\:[0-9]{2}){1,2})/,
date_long => qr/
Expand Down

0 comments on commit 403cddd

Please sign in to comment.