Perl WebService::Blogger
我一直在尝试使用 Perl 模块 WebService::Blogger (来自 CPAN)连接到我的博客帐户,但在创建 WebService::Blogger 类的新对象时遇到问题。当我像文档中给出的示例一样调用新的构造函数时:
WebService::Blogger->new(login_id=>'username', password=>'password');
我收到一条错误消息:
属性(密码)为必填项。
但是,如果我将详细信息保存在 ~/.www_blogger_rc 中,它就可以正常工作。但是一旦我删除它,它就会开始给我这个错误。有什么想法吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我查看了代码,它似乎是 WebService::Blogger 的 BUILDARGS 方法中的一个错误。它处理从文件加载登录信息,但它不会调用基类 BUILDARGS 来处理传递给
new
的参数。因此,
WebService::Blogger->new(login_id=>'username',password=>'password');
相当于WebService::Blogger->new(login_id=>'username',password=>'password');
。 new();,因为 BUILDARGS 丢弃了参数。请报告错误。
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 toWebService::Blogger->new();
, since BUILDARGS discarded the parameters.Please report the bug.