开发者

Perl WebService::Blogger

开发者 https://www.devze.com 2023-01-25 00:58 出处:网络
I\'ve been trying to use the Perl module WebService::Blogger (from CPAN) to connect to my blogger account, but I\'m having problem creating a new object of the WebService::Blogger class. When I call t

I've been trying to use the Perl module WebService::Blogger (from CPAN) to connect to my blogger account, but I'm having problem creating a new object of the WebService::Blogger class. When I call the new constructor like the example given in the documentation:

WebService::Blogger->new(login_id=>'username', password=>'password');

I get an error saying that:

开发者_如何学编程

Attribute (password) is required.

However, if I save the details in the ~/.www_blogger_rc, it works fine. But once I remove it, it starts giving me this error. Any ideas?


I looked at the code, and it appears to be a bug in the BUILDARGS method of WebService::Blogger. It handles loading the login information from a file, but it doesn't call the base class BUILDARGS to handle parameters passed to new.

As a result, WebService::Blogger->new(login_id=>'username', password=>'password'); is equivalent to WebService::Blogger->new();, since BUILDARGS discarded the parameters.

Please report the bug.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号