Subject: | WebService-MusicBrainz-0.20 |
Date: | Mon, 19 Jan 2009 20:41:34 +0000 |
To: | bug-WebService-MusicBrainz [...] rt.cpan.org |
From: | Christopher Key <cjk32 [...] cam.ac.uk> |
Hello,
Whilst tracking down the recently fixed problem with puids, I also
noticed a similar (unverified) error relating to tags. The attached
patch should fix this, and makes '_create_alias' consistent with the
rest of the code.
Kind Regards,
Chris Key
diff -ur WebService-MusicBrainz-0.20.orig/lib/WebService/MusicBrainz/Response.pm WebService-MusicBrainz-0.20/lib/WebService/MusicBrainz/Response.pm
--- WebService-MusicBrainz-0.20.orig/lib/WebService/MusicBrainz/Response.pm 2009-01-19 20:29:05.000000000 +0000
+++ WebService-MusicBrainz-0.20/lib/WebService/MusicBrainz/Response.pm 2009-01-19 20:35:52.000000000 +0000
@@ -519,7 +519,8 @@
}
sub _create_alias {
- my $xAlias = shift;
+ my $self = shift;
+ my ($xAlias) = @_;
require WebService::MusicBrainz::Response::Alias;
@@ -548,7 +549,7 @@
my @aliases;
foreach my $xAlias ($xpc->findnodes('mmd:alias', $xAliasList)) {
- my $alias = _create_alias($xAlias);
+ my $alias = $self->_create_alias($xAlias);
push @aliases, $alias if defined($alias);
}
@@ -787,7 +788,7 @@
my @tags;
foreach my $xTag ($xpc->findnodes('mmd:tag', $xTagList)) {
- my $tag = _create_tag( $xTag );
+ my $tag = $self->_create_tag( $xTag );
push @tags, $tag;
}