Re: MARC::Record elementary question?

2005-08-29 Thread Andy Lester
On Mon, Aug 29, 2005 at 05:02:20PM -0500, John D Thiesen ([EMAIL PROTECTED]) 
wrote:
 What I have appears to be 5.00402, so maybe that's the primary problem. I 

That's the problem.  5.004 is very old, and doesn's support the qr//
operator.

 My knowledge of installing Perl modules is basically nonexistent; in this 
 case, I just copied the source code from the CPAN web site into the proper 
 files under perl/lib. That's probably not the right way to do it.

It's not.  If you're using ActiveState's Perl, use the PPM program.

xoa

-- 
Andy Lester = [EMAIL PROTECTED] = www.petdance.com = AIM:petdance


Re: Check ISBN sub

2005-08-12 Thread Andy Lester
Please also investigate the Business::ISBN module.

xoa

-- 
Andy Lester = [EMAIL PROTECTED] = www.petdance.com = AIM:petdance


Re: diff and sed

2005-04-01 Thread Andy Lester
On Fri, Apr 01, 2005 at 10:54:20AM -0600, John E Guillory ([EMAIL PROTECTED]) 
wrote:
 This isn't a perl question explicitly (but I am a librarian!).

And it's sort of Perl-related because Larry Wall wrote patch years and
years ago, before Perl was invented.

-- 
Andy Lester = [EMAIL PROTECTED] = www.petdance.com = AIM:petdance


Re: mailing lists vs. Google Groups (Usenet)

2005-03-23 Thread Andy Lester
On Wed, Mar 23, 2005 at 11:11:22AM -0600, Doran, Michael D ([EMAIL PROTECTED]) 
wrote:
 Although serving a similar purpose, I make a distinction between
 listservs and news groups.  The main distinction being that I assume the
 audience for the listserv is the people who explicitly subscribe to the
 listserv, whereas the audience for Google Groups are basically the whole
 world.  This distinction affects my posting behavior. 

I would suggest that the distinction you draw between the two is
imaginary.  I expect that anything that I send to anything that is
not a single person may potentially get mirrored somewhere that Google
(or any search engine) will find.


 The fact that perl4lib postings also go to Google Groups should at least
 be mentioned in the WELCOME to perl4lib@perl.org automated

It sure couldn't hurt.


Also, LISTSERV is a trademark.  The generic term is mailing list.

http://www.lsoft.com/corporate/legal.asp

-- 
Andy Lester = [EMAIL PROTECTED] = www.petdance.com = AIM:petdance


Re: delete_subfields()

2004-08-18 Thread Andy Lester
On Wed, Aug 18, 2004 at 03:34:11PM -0500, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote:
 MARC::Field-as_string() takes a string of subfields rather than an array.
 It would be better for as_string() and delete_subfields() to have the same
 interface.  Since as_string() is used a lot in production,
 delete_subfields() should be the one to change.

Or they could be smart enough to Do The Right Thing.

xoa

-- 
Andy Lester = [EMAIL PROTECTED] = www.petdance.com = AIM:petdance


Fwd: [CPAN Upload: P/PE/PETDANCE/MARC-Record-1.39_01.tar.gz: upload@pause.perl.org]

2004-07-26 Thread Andy Lester
Here's a new update to MARC::Record.

[ENHANCEMENTS]
- Support for UTF8 in Perls = 5.8.1. When using a utf8 friendly Perl
  all file streams will be opened in utf8 mode, and the bytes pragma
  will be used to create and use direcotry byte offsets..
- Added MARC::File::Utils which contains utf8 safe functions.
- marcdump now sets STDOUT to utf8 if it is able to.
- t/utf8.t is no longer skipped.
- removed redundant record length check in MARC::File::USMARC::_next()
  and adjusted tests in t/75.warnings.t
- All tests run under -T except t/utf8.t.


The uploaded file

MARC-Record-1.39_01.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/P/PE/PETDANCE/MARC-Record-1.39_01.tar.gz
  size: 116742 bytes
   md5: 8ff56d19f9d4beaf028f1e31e9dfc28a

No action is required on your part
Request entered by: PETDANCE (Andy Lester)
Request entered on: Tue, 27 Jul 2004 00:02:34 GMT
Request completed:  Tue, 27 Jul 2004 00:04:39 GMT

Thanks,
-- 
paused, v460


- End forwarded message -

-- 
Andy Lester = [EMAIL PROTECTED] = www.petdance.com = AIM:petdance


Re: MARC.pm questions

2004-05-14 Thread Andy Lester
On Fri, May 14, 2004 at 09:14:23PM -0400, Eli Naeher ([EMAIL PROTECTED]) wrote:
 Probably dumb questions. However, the archives don't appear to be searchable so here 
 goes:
 
 a. What's the difference between MARC.pm and MARC::Record  co.? Is MARC.pm 
 deprecated/obsolete/no longer developed?

Yes, use MARC::Record going forward.


-- 
Andy Lester = [EMAIL PROTECTED] = www.petdance.com = AIM:petdance


Re: STDIN as well as command line input

2004-04-26 Thread Andy Lester
On Mon, Apr 26, 2004 at 10:14:51AM -0500, Eric Lease Morgan ([EMAIL PROTECTED]) wrote:
 What should I do to my first program (foo.pl) so it can accept command 
 line input as well as input from STDIN?

How are you reading from the files?  Opening them yourself one at a time?
Don't.  Use the magic filehandle.

See my talk A Field Guide To The Perl Command Line on
http://petdance.com/perl/.  It was also an article in The Perl Journal a
few months back.  

I'll be presenting the talk at YAPC this year.  http://www.yapc.org/America/

xoa

-- 
Andy Lester = [EMAIL PROTECTED] = www.petdance.com = AIM:petdance


Re: automagically create browsable POD pages

2004-04-01 Thread Andy Lester
What's the ultimate goal?  Do you want these pages served up by Apache?
If so, look at my Apache::Pod::HTML which I created just for this very
purpose.  We have all our docs (coding stanards and so on) done in POD,
but browsable via Apache using it.

(http://search.cpan.org/dist/Apache-Pod/)

 Might look at DocSet on CPAN.  perl.apache.org is generated with it from
 pod files.

All the perl.org sites (like qa.perl.org which I currently maintain) are
done with Template Toolkit, and much of qa.perl.org is Pod that changes
automagically behind the scenes.

xoa

-- 
Andy Lester = [EMAIL PROTECTED] = www.petdance.com = AIM:petdance


Re: Using as_string() in Marc::batch

2004-02-25 Thread Andy Lester
 I'm using as_string() in Marc::Batch to get 650 fields and mash all the
 subfields together so I can push them into a database.  Works great, but
 what I'd really like to do is have fields such as:
 
 Health Services Canada.
 
 appear as
 
 Health Services -- Canada.

Well, it's MARC::Field that is doing the as_string().

The dashes between the a, x, y and z is bringing me back to 1991 when I
was working on the punctuation for the CardMaster Plus product for
Follett Software.  What I had to do back then was create a big table
that summarized the AACR2 rules as best as possible.  It was big mess,
with certain punctuation coming before certain fields, and some after.
For example, in your Health Services -- Canada, the  --  isn't after
the _a subfield, but rather that it's before the _x.

All that was in C, before object-oriented programming (at least in
our shop), so these days we'd probably have a MARC::Field::650 subclass
that overrides the as_string() method.  That could get pretty hairy for
all the potential tags running around, especially since 600 and 650 and
a good many other 6xx tags would be similar.

I'm open to ideas.

xoa

-- 
Andy Lester = [EMAIL PROTECTED] = www.petdance.com = AIM:petdance


Re: MARC-editing Perl/Tk widget

2004-01-16 Thread Andy Lester
 By the way... I've tentatively called the widgets:
 Tk-MARC-record
 Tk-MARC-field
 Tk-MARC-subfield
 Tk-MARC-indicators
 Tk-MARC-leader

I'd use initial caps, assuming that they create MARC::Record,
MARC::Field etc objects.  Otherwise, people using will have to remember
that it's Tk::MARC::record and MARC::Record, which will be confusing.

xoa

-- 
Andy Lester = [EMAIL PROTECTED] = www.petdance.com = AIM:petdance


MARC::Record v1.34

2003-12-16 Thread Andy Lester
The uploaded file

MARC-Record-1.34.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/P/PE/PETDANCE/MARC-Record-1.34.tar.gz

The big change in this release is the ability to read from a pipe, or
an output stream.  In our case (at Follett Library Resources), we have
thousands of MARC files that we've gzipped to save space (they save
about 85-90% gzipped), but we still need to be able to use the data on
the fly in our new TitleWise service.  Rather than decompressing and
then opening the file, Ed Summers worked it out so that MARC::File::*
can read from a pipe.

We were considering letting the marcdump and marclint programs read from
standard input, but you can do that with - as a filename anyway.


1.34December 16th, 2003
[ENHANCEMENTS]
- modified MARC::File::in() to allow passing in filehandles instead
  of a filename. Useful in situations where you might have data
  compressed on disk, and want to read from a decompression pipe.
  This effects MARC::Batch of course as well, which has had its
  documentation updated.
- added t/85.fh.t to test new filehandle passing
- Incorrect filetypes passed in to the MARC::Batch constructor
  now croak instead of die, so you can see where in your code it
  was called.

[FIXES]
- etc/specs modified to correctly parse LCs docs to get the 250
  $b properly. Thanks Bryan Baldus at Quality Books.
- new Lint.pm with 250 $b.
- MARC::Field now leaves alphabetic indicators as they are instead
  of squashing to a space.  Thanks Leif Andersson from Stockholms
  Universitet.
- MARC::File::USMARC no longer checks the validity of indicators
  but leaves that up to MARC::Field (instead of having the check twice).
- In MARC::Batch, the 'warn' elements weren't quoted.
- warnings_on and strict_on should now be respected.

Have fun!

xoa

-- 
Andy Lester = [EMAIL PROTECTED] = www.petdance.com = AIM:petdance


Re: MARC::Record in CVS and testing

2003-11-25 Thread Andy Lester
 Are you familiar with Test::More?  It has some cool features that can 
 be tricky (conditionally skipping tests, TODO tests, etc.), so holler 
 if you have questions.  I haven't examined MARC::Record's test suite 
 closely, but what I've seen looks very well done, so you should be able 
 to learn from it.

Thanks.  I've got some slides from presentations I've done on testing,
too.

http://www.petdance.com/perl/automated-testing/
http://www.petdance.com/perl/large-project-testing.pdf

xoa

-- 
Andy Lester = [EMAIL PROTECTED] = www.petdance.com = AIM:petdance