Skip Menu |
 

This queue is for tickets about the CouchDB-View CPAN distribution.

Report information
The Basics
Id: 56000
Status: open
Priority: 0/
Queue: CouchDB-View

People
Owner: Nobody in particular
Requestors: beettlle [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Error in CouchDB:View:Server
Date: Sat, 27 Mar 2010 09:52:39 -0700
To: bug-CouchDB-View [...] rt.cpan.org
From: Cesar Delgado <beettlle [...] gmail.com>
Download (untitled) / with headers
text/plain 1.5k
I've been trying to get the perl couchdb view engine to work for the last couple of days and I'm stuck. I am running couchdb 0.10.1 on a CentOS 5 system. I had some problems finding the right rpm site to download all the pre-reqs. Once I got that sorted out your module installed with no problems. This is the version of things I'm running: Couch-View: CouchDB-View-0.003 perl: "This is perl, v5.8.8 built for i386-linux-thread-multi" OS: CentOS 5 "Linux Bluegene 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 i686 i386 GNU/Linux" When I started I added the following lines to my etc/couchdb/local.ini: [query_servers] text/perl = /usr/bin/couchdb-view-server.pl I restarted and tried to run a small test on the Relax Web UI map function: sub { my ($doc) = @_; dmap($doc, 1); } That gave me an : "Error: unknown_query_language". So I removed the "text/" part in the ini file and I got an "Errr: os_process_error {exit_status, 255}". Doing a little snooping around I found it was coming from the couchdb-view-server.pl script. ~]$ /usr/bin/couchdb-view-server.pl Can't bless non-reference value at /usr/lib/perl5/site_perl/5.8.8/CouchDB/View/Server.pm line 16. ~]$ echo $? 255 ~]# echo "[\"reset\"]" | /usr/bin/couchdb-view-server.pl Can't bless non-reference value at /usr/lib/perl5/site_perl/5.8.8/CouchDB/View/Server.pm line 16. ~]# echo $? 255 I guess, more exactly it's coming from the Server.pm module. I've looked at the code and can't figure for the life of me what's going on in like 16. I'm stuck. Any and all help would be greatly appreciated. -Cesar Delgado
From: adrian.duong [...] gmail.com
Download (untitled) / with headers
text/plain 1.8k
On Sat Mar 27 12:53:00 2010, beettlle@gmail.com wrote: Show quoted text
> I've been trying to get the perl couchdb view engine to work for the > last couple of days and I'm stuck. I am running couchdb 0.10.1 on > a CentOS 5 system. I had some problems finding the right rpm site > to download all the pre-reqs. Once I got that sorted out your > module installed with no problems. > > This is the version of things I'm running: > > Couch-View: CouchDB-View-0.003 > perl: "This is perl, v5.8.8 built for i386-linux-thread-multi" > OS: CentOS 5 "Linux Bluegene 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 > EDT 2007 i686 i686 i386 GNU/Linux" > > When I started I added the following lines to my > etc/couchdb/local.ini: > > [query_servers] > text/perl = /usr/bin/couchdb-view-server.pl > > I restarted and tried to run a small test on the Relax Web UI map > function: > > sub { > my ($doc) = @_; > dmap($doc, 1); > } > > That gave me an : "Error: unknown_query_language". So I removed the > "text/" part in the ini file and I got an "Errr: os_process_error > {exit_status, 255}". Doing a little snooping around I found it was > coming from the couchdb-view-server.pl script. > > ~]$ /usr/bin/couchdb-view-server.pl > Can't bless non-reference value at > /usr/lib/perl5/site_perl/5.8.8/CouchDB/View/Server.pm line 16. > ~]$ echo $? > 255 > ~]# echo "[\"reset\"]" | /usr/bin/couchdb-view-server.pl > Can't bless non-reference value at > /usr/lib/perl5/site_perl/5.8.8/CouchDB/View/Server.pm line 16. > ~]# echo $? > 255 > > I guess, more exactly it's coming from the Server.pm module. I've > looked at the code and can't figure for the life of me what's going > on in like 16. I'm stuck. > > Any and all help would be greatly appreciated. > > -Cesar Delgado >
Perhaps a year and a half too late, but the problem is indeed in Server.pm. The new is attempting to bless undef. A patch for this is attached.
Subject: couch-view-server.patch
--- Server.pm~ 2008-05-17 13:08:40.000000000 -0400 +++ Server.pm 2011-11-22 18:35:16.227706763 -0500 @@ -24,7 +24,7 @@ sub run { my $self = shift; - $self = $self->new if not ref $self; # autovivify + $self = $self->new({}) if not ref $self; # autovivify $self->in or $self->in (IO::Handle->new_from_fd(\*STDIN, 'r')); $self->out or $self->out(IO::Handle->new_from_fd(\*STDOUT, 'w'));


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

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