Skip to content

Commit acacb55

Browse files
author
Chris White
committed
Bugfix in --version handling [minor]
1 parent a6ee10b commit acacb55

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/Text/PerlPP.pm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -806,8 +806,9 @@ sub Main {
806806
}
807807

808808
if($self->{Opts}->{PRINT_VERSION}) { # print version, raw and dotted
809-
$Text::PerlPP::VERSION =~ m<^([^\.]+)\.(\d{3})(\d{3})>;
810-
printf "PerlPP version %d.%d.%d ($VERSION)\n", $1, $2, $3;
809+
$Text::PerlPP::VERSION =~ m<^([^\.]+)\.(\d{3})(_?)(\d{3})>;
810+
printf "PerlPP version %d.%d.%d ($VERSION)%s\n", $1, $2, $4,
811+
($3 ? ' (dev)' : '');
811812
if($self->{Opts}->{PRINT_VERSION} > 1) {
812813
print "Script: $0\nText::PerlPP: $INC{'Text/PerlPP.pm'}\n";
813814
}

0 commit comments

Comments
 (0)