Subject: | Wrong types in Entry.pm |
Date: | Thu, 26 Apr 2012 14:22:17 +0200 |
To: | bug-webservice-blogger [...] rt.cpan.org |
From: | Joel Ericson <kasettbok [...] gmail.com> |
Hi.
Since blog entries can have an empty title and empty content (and thus have
uninitialized corresponding variables), their type must be set to
Maybe[Str] rather than Str. Otherwise the program crashes when it tries to
list the blog entries.
Patch:
--------------------------------------------------
--- Entry.pm 2012-04-26 13:38:27.231363061 +0200
+++ /usr/lib64/perl5/site_perl/5.12.4/WebService/Blogger/Blog/Entry.pm
2012-04-26 13:57:33.933947057 +0200
@@ -10,8 +10,8 @@
# Properties that can be updated in existing entries.
-has title => ( is => 'rw', isa => 'Str' );
-has content => ( is => 'rw', isa => 'Str' );
+has title => ( is => 'rw', isa => 'Maybe[Str]' );
+has content => ( is => 'rw', isa => 'Maybe[Str]' );
has categories => ( is => 'rw', isa => 'ArrayRef[Str]', auto_deref =>
1 );
--------------------------------------------------
Regards
Joel
Message body is not shown because sender requested not to inline it.