Skip to content

Instantly share code, notes, and snippets.

@arisawa
Created October 5, 2011 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arisawa/1264230 to your computer and use it in GitHub Desktop.
Save arisawa/1264230 to your computer and use it in GitHub Desktop.
FCGI が orepan_index.pl で index されない問題
--- Archive.pm 2011-10-05 20:18:08.000000000 +0900
+++ Archive.pm.new 2011-10-05 20:18:32.000000000 +0900
@@ -161,7 +161,7 @@
my $basename = fileparse("$parsefile");
$basename =~ s/\..+$//;
my @candidates = sort { !$a->[1] <=> !$b->[1] }
- grep { $_->[0] =~ m/$basename$/ } @pkgs;
+ grep { $_->[0] =~ m/($basename)$/ || $basename eq 'version' } @pkgs;
return @{$candidates[0]} if @candidates;
return;
}
@arisawa
Copy link
Author

arisawa commented Oct 5, 2011

FCGI に FCGI.pm がないため、OrePAN::Archive内でversion.pmを読む。
バージョン取得後、basenameとモジュール名を比較するところでマッチしないためにバージョンが取得できない。

結果 {} が $index->add され、save時のOrePAN::Package::Index:86 でスルーされてしまっているようです。

diffはやっつけ対応してみた形。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment