Skip Menu |

This queue is for tickets about the REST-Google-Apps-Provisioning CPAN distribution.

Report information
The Basics
Id: 50752
Status: resolved
Priority: 0/
Queue: REST-Google-Apps-Provisioning

People
Owner: sschneid [...] gmail.com
Requestors: zrajm [...] klingonska.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Fwd: getAllNicknames() always fail in v1.1.6
Date: Thu, 22 Oct 2009 16:28:36 +0200
To: bug-REST-Google-Apps-Provisioning [...] rt.cpan.org
From: Zrajm C Akfohg <zrajm [...] klingonska.org>
I re-wrote getAllNicknames() by copy-pasting and reducing getNickname() -- and this works: sub getAllNicknames { my $self = shift; my $url = qq(https://apps-apis.google.com/a/feeds/$self->{'domain'}/nickname/2.0/); my $result = $self->_request( 'method' => 'GET', 'url' => $url ) || return( 0 ); my ( $ref, $nickname ); foreach ( keys %{$result->{'entry'}} ) { $nickname = $1 if /^.*\/(.+)$/; $ref->{$nickname} = { %{$result->{'entry'}->{$_}->{'apps:login'}}, %{$result->{'entry'}->{$_}->{'apps:nickname'}} } } return( $ref ); } Show quoted text
---------- Forwarded message ---------- From: Zrajm C Akfohg <zrajm@klingonska.org> Date: Thu, Oct 22, 2009 at 15:43 Subject: getAllNicknames() always fail in v1.1.6 To: bug-REST-Google-Apps-Provisioning@rt.cpan.org Calling getAllNicknames() always gives the error message "Missing required 'nickname' argument". Looking into the code, the problem is obvious. getAllNicknames() is defined as follows:    sub getAllNicknames { return shift->getNickname(); } And getNickname() in turn checks to make sure that it's given at least one "nickname" argument, croaking otherwise. If I comment out this check, getAllNicknames() gives a warning, returns all nicknames, as expected. #    foreach my $param ( qw/ nickname / ) { #        $arg->{$param} || croak( "Missing required '$param' argument" ); #    } /zrajm
Patch added to GitHub: http://github.com/sschneid/perl-rest-google-apps/commit/171dba98b9a7d678e871db193ab181411d381491 I've uploaded a new version of the module (1.1.7) to CPAN; will close ticket in a few days once it has been indexed and mirrored.