Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Net-Google-Drive-Simple CPAN distribution.

Report information
The Basics
Id:
123713
Status:
resolved
Priority:
Low/Low

People
Owner:
Nobody in particular
Requestors:
tim [...] cpanel.net
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
0.13
Fixed in:
(no value)

Attachments
0001-Fix-second-return-value-for-children.patch



Subject: Second value returned by children() changed in 0.13
In 0.12 the children() function used to return the id of the folder as the second value as described in the docs: my( $children, $parent ) = $gd->children( "/path/to" ); If the caller now wants to e.g. insert a file into the directory, its ID is available in $parent. In 0.13 it now returns the id of the parent of the folder, instead. The attached patch changes it to behave as it did before.
Subject: 0001-Fix-second-return-value-for-children.patch
From 7ccc6f09685f0d8af0a74f47652f1853e703c87b Mon Sep 17 00:00:00 2001 From: Tim Mullin <tim@cpanel.net> Date: Wed, 22 Nov 2017 13:22:40 -0600 Subject: [PATCH] Fix second return value for children Version 0.13 changed the second value returned from the children() function to be the id of the parent of the folder rather than the id of the folder as it used to do in version 0.12. This fix causes the children function to return the folder id as the second value. --- lib/Net/Google/Drive/Simple.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Net/Google/Drive/Simple.pm b/lib/Net/Google/Drive/Simple.pm index e9fc6da..0edccfa 100644 --- a/lib/Net/Google/Drive/Simple.pm +++ b/lib/Net/Google/Drive/Simple.pm @@ -476,7 +476,7 @@ sub children { } if( wantarray ) { - return( $children, $parent ); + return( $children, $folder_id ); } else { return $children; } -- 2.15.0


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.