Skip Menu |

This queue is for tickets about the JE CPAN distribution.

Report information
The Basics
Id: 39462
Status: resolved
Priority: 0/
Queue: JE

People
Owner: Nobody in particular
Requestors: boronk [...] boronk.de
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.024
Fixed in: 0.026



The following code throws an error an does not sort the right way: TypeError: Can't call method "call" on unblessed reference at /usr/local/share/perl/5.8.7/JE/Object/Array.pm line 601. Code: function UserSubmit(user,submits) { this.user=user; this.submits=submits; } function UserSubmitSort (a, b) { return a.submits - b.submits; } var um=new Array( new UserSubmit("a",3), new UserSubmit("bc",1), new UserSubmit("add",35), new UserSubmit("eaea",23) ); um.sort(UserSubmitSort); for(i=0;i<um.length;i++) { print(um[i].submits+" "+um[i].user+"\n"); }
Thank you for your report. It turns out I was creating a closure while clobbering the object the closure was supposed to reference, like this: $comp = sub { $comp } This has been fixed in my working copy, and will make its way into version 0.026 in the next day or two....
OK, I’ve just uploaded a fixed version: Show quoted text
>The uploaded file > > JE-0.026.tar.gz > >has entered CPAN as > > file: $CPAN/authors/id/S/SP/SPROUT/JE-0.026.tar.gz > size: 224494 bytes > md5: ad6879e49ff62afbed75614cf53ce66f > >No action is required on your part >Request entered by: SPROUT (Father Chrysostomos) >Request entered on: Mon, 22 Sep 2008 05:41:25 GMT >Request completed: Mon, 22 Sep 2008 05:42:28 GMT > >Thanks, >-- >paused, v1047 > >