M Changelog => Changelog +4 -0
@@ 6,3 6,7 @@
0.003 2021-07-29
- Add some metadata for metacpan
+
+0.004 2021-07-29
+- Merge https://github.com/bradclawsie/Lang-Go-Mod/pull/1 for
+ comment processing
M lib/Lang/Go/Mod.pm => lib/Lang/Go/Mod.pm +5 -4
@@ 13,7 13,7 @@ use Path::Tiny qw(path);
# ABSTRACT: parse and model go.mod files
-our $VERSION = '0.003';
+our $VERSION = '0.004';
our $AUTHORITY = 'cpan:bclawsie';
our @EXPORT_OK = qw(read_go_mod parse_go_mod);
@@ 121,11 121,11 @@ sub parse_go_mod {
if ( defined $m->{'require'}->{$1} );
$m->{'require'}->{$1} = $2;
}
- elsif ( $line =~ m!^\s*//.*$! ) {
+ elsif ( $line =~ m{^\s*//.*$}mx ) {
- # comment
+ # comment
- }
+ }
else {
croak "unknown line content: $line";
}
@@ 150,6 150,7 @@ C<Lang::Go::Mod> - parse and model go.mod files
# $ cat go.mod
# module github.com/example/my-project
# go 1.16
+ # // comments
# exclude (
# example.com/whatmodule v1.4.0
# )
M t/samples/01/go.mod => t/samples/01/go.mod +2 -0
@@ 2,6 2,8 @@ module github.com/example/my-project
go 1.16
+// these are comments
+
exclude (
example.com/whatmodule v1.4.0
)