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

Mark Gregson mark.gregson at qut.edu.au
Tue Dec 17 23:33:38 GMT 2013

Have you tried 'use'-ing the new DataObj modules somewhere like EPrints.pm? e.g., 'use EPrints::DataObj::Subscriber;'


Mark Gregson | Applications and Development Team Leader
Library eServices | Queensland University of Technology
Level 3 | R Block | Kelvin Grove Campus | GPO Box 2434 | Brisbane 4001
Phone: +61 7 3138 3782 | Web: http://eprints.qut.edu.au/
ABN: 83 791 724 622
CRICOS No: 00213J

-----Original Message-----
From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Ian Stuart
Sent: Wednesday, 18 December 2013 2:09 AM
To: eprints
Subject: [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.


This email was sent via the University of Edinburgh.

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

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/

More information about the Eprints-tech mailing list