From: Dagfinn Ilmari Mannsåker Date: Fri, 23 Feb 2018 14:20:12 +0000 (+0000) Subject: Recognise underscores in version markers X-Git-Tag: v0.07048_01~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cad489883d06f652160e1d76bcc6b66f37471af1;p=dbsrgits%2FDBIx-Class-Schema-Loader.git Recognise underscores in version markers --- diff --git a/lib/DBIx/Class/Schema/Loader/Base.pm b/lib/DBIx/Class/Schema/Loader/Base.pm index db8b807..59f9b83 100644 --- a/lib/DBIx/Class/Schema/Loader/Base.pm +++ b/lib/DBIx/Class/Schema/Loader/Base.pm @@ -2277,7 +2277,7 @@ sub _parse_generated_file { my $mark_md5 = $2; # Pull out the version and timestamp from the line above - ($ver, $ts) = $gen =~ m/^# Created by DBIx::Class::Schema::Loader( v[\d.]+)?( @ [\d-]+ [\d:]+)?\r?\Z/m; + ($ver, $ts) = $gen =~ m/^# Created by DBIx::Class::Schema::Loader( v[\d._]+)?( @ [\d-]+ [\d:]+)?\r?\Z/m; $ver =~ s/^ v// if $ver; $ts =~ s/^ @ // if $ts; diff --git a/t/23dumpmore.t b/t/23dumpmore.t index 82c731d..dd0ec93 100644 --- a/t/23dumpmore.t +++ b/t/23dumpmore.t @@ -620,7 +620,7 @@ $t->dump_test( }, regexes => { Foo => [ - qr/^\# Created by DBIx::Class::Schema::Loader v[\d.]+$/m, + qr/^\# Created by DBIx::Class::Schema::Loader v[\d._]+$/m, ], }, );