Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add semicolon at the end of feature block #23

Open
wants to merge 1 commit into from

2 participants

@hirose31

No description provided.

@miyagawa
Owner

Hmm Travis looks failing. Any ideas?

@hirose31

Module::CPANfile#to_string on github HEAD generates a "feature" block WITHOUT any "requires" lines. (1.0002 is OK)

What do you think about that branch from 1.0002 tag and apply this commit, release as 1.0003 if master branch needs to time to be stable?

@miyagawa
Owner

That sounds like a separate bug that needs to be fixed on master anyway, backporting this fix doesn't sound worth it.

@hirose31

I agrees to fix on master two bugs.

But now, cpanfile generated by Modules::CPANfile#to_string v1.0002 (head of release version) causes syntax error (because of missing semicolon) when that cpanfile has "feature" block.

When are you planning to release new version from HEAD of master branch? Is there any blocker issues?

@miyagawa
Owner

I'd rather fix that bug that causes test failure and make a release out of master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 10, 2013
  1. @hirose31
This page is out of date. Refresh to see the latest.
Showing with 16 additions and 1 deletion.
  1. +1 −1  lib/Module/CPANfile.pm
  2. +15 −0 t/feature.t
View
2  lib/Module/CPANfile.pm
@@ -128,7 +128,7 @@ sub to_string {
for my $feature (values %{$self->{result}{features}}) {
$code .= sprintf "feature %s, %s => sub {\n", _dump($feature->{identifier}), _dump($feature->{description});
$code .= $self->_dump_prereqs($feature->{spec}, $include_empty, 4);
- $code .= "}\n\n";
+ $code .= "};\n\n";
}
$code =~ s/\n+$/\n/s;
View
15 t/feature.t
@@ -20,6 +20,21 @@ FILE
}
{
+ my $content = <<FILE;
+feature 'mysql', 'MySQL' => sub {
+ requires 'DBD::mysql';
+};
+
+feature 'sqlite', 'SQLite' => sub {
+ requires 'DBD::SQLite';
+};
+FILE
+ my $r = write_cpanfile($content);
+ my $cpanfile = Module::CPANfile->load;
+ is $cpanfile->to_string, $content;
+}
+
+{
my $r = write_cpanfile(<<FILE);
on test => sub {
requires 'Test::More', '0.90';
Something went wrong with that request. Please try again.