EPrints Technical Mailing List Archive

Message: #02498


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Adding new Data Objects into EPrints 3.2


I've looked at the documentation and the training material, and I think I understand how it works:

I create EPrints::DataObj::Foo packages in ~~eprints/archives/<ARCHIVE_ID>/cfg/plugins/EPrints/DataObj/

I enable them in ~~eprints/archives/<ARCHIVE_ID>/cfg/cfg.d/zz_postcards.pl thus:

----- code ------
use strict;
use warnings;

if( !defined $c->{datasets} )
{
	$c->{datasets} = {};
}

$c->{datasets}->{postcard} = {
    class => 'EPrints::DataObj::Subscriber',
  sqlname => 'subscriber',
};
$c->{datasets}->{subscriber} = {
  class    => 'EPrints::DataObj::Postcard',
  sqlname => 'postcard',
};
$c->{datasets}->{subscriberticket} = {
  class   => 'EPrints::DataObj::SubscriberTicket',
  sqlname => 'subscriberticket',
};
----- code ------
(copied from datasets.pl)

I have checked all three packages: all three are well formed (they can be reformatted with perltidy), and reasonable sound (there are minor warnings from perlcritic)

The problem is my server will now not start:
[Tue Dec 17 15:37:24 2013] [error] Can't locate object method "get_system_field_info" via package "EPrints::DataObj::Subscriber" (perhaps you forgot to load "EPrints::DataObj::Subscriber"?) at /home/broker/eprints/perl_lib/EPrints/DataSet.pm line 407.\n

If I move them into ~~/eprints/perl_lib/EPrints/DataObj/ and restart the server, I still don't see them

The problem appears to be in zz_postcards.pl - if I dump the contents of $c->{datasets} in zz_postcards.pl then I only see my three packages, which is NOT what I'd expect to see.

Any ideas as to why the packages are not being loaded, and how to kick them into life?

--

Ian Stuart.
Developer: ORI, RJ-Broker, and OpenDepot.org
Bibliographics and Multimedia Service Delivery team,
EDINA,
The University of Edinburgh.

http://edina.ac.uk/

This email was sent via the University of Edinburgh.

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.