2010-08-01T00:13:31 *** mck9 has left #evergreen 2010-08-01T00:28:14 *** mrpeters-isl has quit IRC 2010-08-01T00:36:28 *** mrpeters-isl has joined #evergreen 2010-08-01T00:41:28 *** mrpeters-isl has quit IRC 2010-08-01T00:50:39 *** leed has quit IRC 2010-08-01T01:46:45 *** mrpeters-isl has joined #evergreen 2010-08-01T01:51:09 *** mrpeters-isl has quit IRC 2010-08-01T02:20:05 *** mrpeters-isl has joined #evergreen 2010-08-01T03:58:01 *** mrpeters-isl has quit IRC 2010-08-01T06:00:04 *** mrpeters-isl has joined #evergreen 2010-08-01T06:30:50 *** mrpeters-isl has quit IRC 2010-08-01T06:45:58 *** mrpeters-isl has joined #evergreen 2010-08-01T07:24:21 *** chrissharp123 has joined #evergreen 2010-08-01T07:35:43 *** mrpeters-isl has quit IRC 2010-08-01T07:40:28 *** mrpeters-isl has joined #evergreen 2010-08-01T07:53:24 *** mrpeters-isl has quit IRC 2010-08-01T07:59:20 *** mrpeters-isl has joined #evergreen 2010-08-01T08:04:05 *** mrpeters-isl has quit IRC 2010-08-01T08:32:36 *** mrpeters-isl has joined #evergreen 2010-08-01T08:41:11 *** mrpeters-isl has quit IRC 2010-08-01T09:04:07 *** mrpeters-isl has joined #evergreen 2010-08-01T09:19:38 *** mrpeters-isl has quit IRC 2010-08-01T09:23:28 *** mrpeters-isl has joined #evergreen 2010-08-01T10:06:36 *** mrpeters-isl has quit IRC 2010-08-01T10:45:33 *** mrpeters-isl has joined #evergreen 2010-08-01T11:17:49 *** Dyrcona has joined #evergreen 2010-08-01T11:18:13 * Dyrcona doubts anyone will actually see this, but here it is for the logs. 2010-08-01T11:19:10 I'm looking at translate_isbn1013 this morning, and I'm not sure the existing function does what it should. 2010-08-01T11:19:31 It fails in a strange way, returning the input with a space after it. 2010-08-01T11:20:33 It also fails if the ISBN contains dashes, despite it trying to strip them out. 2010-08-01T11:21:09 The failure occurs because it is checking the length before replacing '-' with ''. 2010-08-01T11:21:42 Business::ISBN works on ISBNs with dashes. 2010-08-01T11:26:31 However, I don't ever see dashes in 020a, and the MARC standard implies that they should be stored without the dashes. 2010-08-01T11:27:07 I'll write the replacement to fail in the same, strange way. It might be better to return an empty string, though. 2010-08-01T11:30:35 Also, the current function uses isnweak(true), which attempts to fix the checksum if it is invalid. Personally, I'd rather not index "bad" ISBNs, but I'll write the replacement to fix the checksum. 2010-08-01T11:31:07 After all, the checksum may actually be correct and two digits in the ISBN as entered could be swapped. 2010-08-01T11:32:16 *** mrpeters-isl has quit IRC 2010-08-01T11:45:06 *** mrpeters-isl has joined #evergreen 2010-08-01T11:57:08 Business::ISBN has some weird behavior. 2010-08-01T12:04:18 This is weird: 2010-08-01T12:04:44 my $isbn_xlated = ($isbn->type == Business::ISBN::ISBN10) ? $isbn->as_isbn13 : $isbn->as_isbn10; 2010-08-01T12:05:19 The above work is the isbn is an isbn10. For an isbn13, I get the isbn13 output again. 2010-08-01T12:06:11 If I instead check for Business::ISBN::ISBN13, then it works for isbn13s but not for isbn10s! 2010-08-01T12:07:10 I thought maybe the problem with the version of Business::ISBN that I installed, so I updated to the latest one from CPAN and it still happens. 2010-08-01T12:07:33 It also doesn't matter if I do this in the database or in a perl program, same strange result. 2010-08-01T12:09:01 Dyrcona pasted "Business::ISBN test for problem" at http://paste.lisp.org/display/113044 2010-08-01T12:10:48 Dyrcona annotated #113044 "sample output" at http://paste.lisp.org/display/113044#1 2010-08-01T12:16:00 If the 13-digit ISBN can be converted to an ISBN10, then Business::ISBN apparently reports the type as ISBN10, either that or type is always just returning 0. 2010-08-01T12:16:34 I *knew* that I'd be better off just writing my own code for this! 2010-08-01T12:27:31 Dyrcona annotated #113044 "Work around" at http://paste.lisp.org/display/113044#2 2010-08-01T12:28:00 Found a work around by checking the length of the ISBN's prefix. 2010-08-01T12:28:47 I find it hard to believe that such a bug exists in Business::ISBN, it makes me think I was doing something fundamentally wrong. 2010-08-01T12:29:05 * Dyrcona goes off to dig into Business::ISBN's code to see if there really is a bug. 2010-08-01T12:31:54 *** mrpeters-isl has quit IRC 2010-08-01T12:48:54 Business::ISBN::ISBN10 and Business::ISBN::ISBN13 are not defined in my copy of the sources. 2010-08-01T12:49:09 Guess I have to file a bug at CPAN. 2010-08-01T13:14:51 *** mrpeters-isl has joined #evergreen 2010-08-01T14:10:38 *** Dyrcona has quit IRC 2010-08-01T14:40:54 *** mrpeters-isl has quit IRC 2010-08-01T15:41:15 *** mrpeters-isl has joined #evergreen 2010-08-01T15:46:37 *** mrpeters-isl has quit IRC 2010-08-01T16:00:31 *** Dyrcona has joined #evergreen 2010-08-01T16:02:34 Going to send a patch for the translate_isbn1013 function to the list tomorrow. Singing off for the day. 2010-08-01T16:02:42 *** Dyrcona has quit IRC 2010-08-01T16:13:33 *** mrpeters-isl has joined #evergreen 2010-08-01T16:18:22 *** mrpeters-isl has quit IRC 2010-08-01T17:04:17 *** mrpeters-isl has joined #evergreen 2010-08-01T17:16:56 *** mrpeters-isl has quit IRC 2010-08-01T17:36:37 *** mrpeters-isl has joined #evergreen 2010-08-01T17:51:43 *** mrpeters-isl has quit IRC 2010-08-01T18:24:23 *** mrpeters-isl has joined #evergreen 2010-08-01T18:33:34 *** mrpeters-isl has quit IRC 2010-08-01T19:40:39 *** chrissharp123 has quit IRC 2010-08-01T19:48:13 *** mrpeters-isl has joined #evergreen 2010-08-01T19:52:40 *** mrpeters-isl has quit IRC 2010-08-01T20:17:10 *** mrpeters-isl has joined #evergreen 2010-08-01T20:36:23 *** mrpeters-isl has quit IRC 2010-08-01T21:50:56 *** mrpeters-isl has joined #evergreen 2010-08-01T21:56:28 *** mrpeters-isl has quit IRC 2010-08-01T21:59:57 *** mrpeters-isl has joined #evergreen 2010-08-01T22:27:30 *** mrpeters-isl has quit IRC 2010-08-01T22:33:23 *** mrpeters-isl has joined #evergreen 2010-08-01T22:53:10 *** mrpeters-isl has quit IRC