Re: OAI::Harvester installation help

2011-05-18 Thread Saiful Amin

 I am attempting to use some code which depends on Net::OAI::Harvester,
 but my attempts to install OAI::Harvester are running into problems
 with:

 Any suggestions for getting this installed properly?  I'm assuming that
 this is a case where a simple force install isn't going to get me a
 working installation...


I've used Net::OAI::Harvester on both Ubuntu and Windows XP for my projects.
On XP I've used Strawberry Perl, in which installing using CPAN luckily
worked without any problem. In Ubuntu, I had to install from synaptic when
CPAN failed. If I remember correctly, the command was:
# sudo apt-get install libnet-oai-harvester-perl

It works better than cpan in managing dependencies in my experience.

Regards,
Saiful Amin


RE: OAI::Harvester installation help

2011-05-18 Thread Dave Sherohman
Thanks for the responses!  I was also contacted off-list by 
Net::OAI::Harvester's maintainer and we tracked the issue down to a rogue 
standalone release of XML::SAX::Base.  Removing that, so that the 
XML::SAX::Base included with XML::SAX was used instead, resolved my problems 
and I was then able to install Net::OAI::Harvester cleanly.

  I am not so familiar with the oai harvesting tools in Perl, so
  forgive me if I am giving you incorrect information. My vague
  recollection is that there are several oai harvesters for Perl.

There are, but the import tool I'm using is specifically built to use 
Net::OAI::Harvester.

 In Ubuntu, I had to install from synaptic when CPAN failed.
 If I remember correctly, the command was:
 # sudo apt-get install libnet-oai-harvester-perl
 
 It works better than cpan in managing dependencies in my experience.

Although my dev laptop is Ubuntu, the servers I deploy to tend to be running 
Very Old Releases of Fedora, so I try to stay within CPAN despite its warts, 
simply for the sake of broad compatibility.  The security of running 
installation tests is a great bonus, too, though - in this particular case, I 
expect that installing Ubuntu's packaged version would have gotten me a 
non-working installation because the rogue XML::SAX::Base would still be there, 
it just wouldn't have been caught during installation.

Re: OAI::Harvester installation help

2011-05-18 Thread Thomas Berger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

thanks to further input from the original reporter I (as co-maintainer of
N:O:H) have been able to sort out the issues illustrated by the report:

- - one of the repositories used in the test suite changed its address
  recently thus causing some tests to fail: fixed

- - The LibXML family of parsers behaves very noisily when it comes to
  the test for illegal XML making it hard to notice that the test
  actually succeeds (not fixed)

Two issues with XML::SAX might be of broader interest:

[not applicable to this thread:
- - ParserDetails.ini
  XML::SAX (::ParserFactory) uses a text file ParserDetails.ini located
  in the folder SAX.pm resides in or (Debian only?) under /etc/perl/...
  This file contains the list of known parsers in this installation and
  their properties. For myself I have noticed several times that this
  file was not generated (because of non-interactive dependency installs?)
  and subsequently installed individual parsers were not registered.
  My impression is that the XML::SAX framework should fall back to
  XML::SAX::PurePerl installed by the package itself but this does
  not seem to happen in the Net::OAI::Harvester test suite (maybe
  because the parser is requested with a required feature).
  Status: not tackled yet
  cf.  http://perl-xml.sourceforge.net/faq/#parserdetails.ini 
]

- - latest version of XML::SAX::Base
  some sub-modules of Net::OAI::Harvester use the get_handler() method
  supplied by XML::SAX::Base as of version 1.04. This module is
  literally hidden in the XML::SAX distribution (source is generated by
  Makefile.PL to prevent indexing of the module on CPAN). There is a
  strain of standalone versions of XML::SAX::Base on CPAN ending at
  version 1.02 which does not contain the method in question. (The README
  of this standalone module gives the warning that you probably do not want
  to install this module but the complete XML::SAX framework).
  When you explicitly request installation of XML::SAX::Base there is
  a probability that this fetches version 1.02 and takes precedence over or
  actually overwrites version 1.04 installed by XML::SAX and there is
  absolutely no upgrade path: XML::SAX::Base 1.02 must be uninstalled/removed
  then for things to work again.
  For Net::OAI::Harvester I have refined the requirement of XML::SAX::Base
  to the specific version 1.04 and I'm awaiting the CPAN Tester reports
  to come in: It might well be that more systems than before are entrapped
  to install the wrong module when performing Build installdeps and thus
  effectively cut themselves off from executing the tests at all.


Thomas Berger



Am 18.05.2011 09:14, schrieb Saiful Amin:

 I am attempting to use some code which depends on Net::OAI::Harvester,
 but my attempts to install OAI::Harvester are running into problems
 with:

 Any suggestions for getting this installed properly?  I'm assuming that
 this is a case where a simple force install isn't going to get me a
 working installation...

 
 I've used Net::OAI::Harvester on both Ubuntu and Windows XP for my projects.
 On XP I've used Strawberry Perl, in which installing using CPAN luckily
 worked without any problem. In Ubuntu, I had to install from synaptic when
 CPAN failed. If I remember correctly, the command was:
 # sudo apt-get install libnet-oai-harvester-perl
 
 It works better than cpan in managing dependencies in my experience.
 
 Regards,
 Saiful Amin
 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iJwEAQECAAYFAk3ThigACgkQYhMlmJ6W47PypwP9HwJSNbwmtOh+3G+Y4wKFJODS
r1UiDOGc/TDi5zcgRtEHq8lDTlH/CecHYnJv5IN5rJiW2icykoI1Th5lEKX5K90N
s+I8xSpEZXfL5k51hTu7Nql5F8iyF/L7lSyMic3s91/kdAraoDgagcf6pEYg4dRt
Lv2MSAS1EPuU6jdU4JQ=
=QUFO
-END PGP SIGNATURE-


RE: marcdump hex switch

2011-05-18 Thread Doran, Michael D
I never got an answer to this back in 2008 and thought I might have better luck 
now...

-- Michael

 -Original Message-
 From: Doran, Michael D
 Sent: Thursday, February 21, 2008 11:03 AM
 To: perl4lib@perl.org
 Subject: marcdump hex switch
 
 I have MARC::Record 2.0 installed [1].  According to the Changes file
 marcdump now has a --hex switch [2]:
 
   [ENHANCEMENTS]
   - Added --hex switch to marcdump, which dumps the record in
 hexadecimal.  The offsets are in decimal so that you can match
 them up to values in the leader.  The offset is reset to 0
 when we're past the directory so that you can match up the data
 with the offsets in the directory.
 
 However I'm *not* finding that my marcdump actually has that hex switch:
 
   /usr/local/scripts/xml/marc = marcdump --hex test.mrc
   Unknown option: hex
   Usage: marcdump [options] file(s)
 
   Options:
 --[no]print Print a MicroLIF-style dump of each record
 --lif   Input files are MicroLIF, not USMARC
 --field=specSpecify a field spec to include.  There may be many.
 Examples:
 --field=245 --field=1XX
 --[no]quiet Print status messages
 --[no]stats Print a statistical summary by file at the end
 --version   Print version information
 --help  Print this summary
 
 I poked around the marcdump script and didn't find anything hex:
 
 my $opt_print = 1;
 my $opt_quiet = 0;
 my $opt_stats = 1;
 my @opt_field = ();
 my $opt_help = 0;
 my $opt_lif = 0;
 
 Any ideas/explanations?  The hex dump functionality would sure be handy.
 
 -- Michael
 
 [1] /usr/local/scripts/xml/marc = marcdump -v
 /usr/local/bin/marcdump, using MARC::Record v2.0
 
 [2] CPAN  Revision history for Perl extension MARC::Record
 http://search.cpan.org/src/MIKERY/MARC-Record-2.0.0/Changes
 
 # Michael Doran, Systems Librarian
 # University of Texas at Arlington
 # 817-272-5326 office
 # 817-688-1926 mobile
 # do...@uta.edu
 # http://rocky.uta.edu/doran/