Skip to content

Instantly share code, notes, and snippets.

@dpetrov
Created October 11, 2011 15:44
Show Gist options
  • Save dpetrov/1278462 to your computer and use it in GitHub Desktop.
Save dpetrov/1278462 to your computer and use it in GitHub Desktop.
diff --git a/lib/MetaCPAN/Web/Model/API/File.pm b/lib/MetaCPAN/Web/Model/API/File.pm
index eaa4d1f..cada94a 100644
--- a/lib/MetaCPAN/Web/Model/API/File.pm
+++ b/lib/MetaCPAN/Web/Model/API/File.pm
@@ -4,12 +4,12 @@ extends 'MetaCPAN::Web::Model::API';
sub get {
my ( $self, @path ) = @_;
- $self->request( '/file/' . join( '/', @path ) );
+ $self->request( '/file/' . join( '/', uc shift @path, @path ) );
}
sub source {
my ( $self, @path ) = @_;
- $self->request( '/source/' . join( '/', @path ), undef, { raw => 1 } );
+ $self->request( '/source/' . join( '/', uc shift @path, @path ), undef, { raw => 1 } );
}
sub dir {
@@ -23,7 +23,7 @@ sub dir {
filter => {
and => [
{ term => { 'file.level' => scalar @path } },
- { term => { 'file.author' => $author } },
+ { term => { 'file.author' => uc $author } },
{ term => { 'file.release' => $release } },
{ prefix => {
'file.path' => join( '/', @path, undef )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment