API:EPrints
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki
Contents
NAME
EPrints - Institutional Repository software
SYNOPSIS
use EPrints qw();
# don't check current user (CLI only)
use EPrints qw( no_check_user );
$eprints = EPrints->new;
# CLI
$repo = $eprints->repository( "demoprints" );
# CGI
$repo = $eprints->current_repository;
if( EPrints->VERSION() gt v3.2.0 )
{
...
}
DESCRIPTION
Available Symbols
You can pass options to the EPrints package that effect the EPrints initialisation e.g.
use EPrints qw( no_check_user );
- no_check_user
- Do not check the current user/group is the same as the user/group in SystemSettings.
Debugging
To get a full stack trace on errors and warnings use Carp's verbose mode. E.g. in perl_lib/EPrints/SystemSettings.pm add:
use Carp 'verbose';
METHODS
VERSION
$version = EPrints->VERSION()
Returns the version of EPrints in 'v' format (this is the UNIVERSAL method).
human_version
EPrints->human_version()
Returns the EPrints version in a human-readable form.
abort
EPrints->abort( $errmsg )
This subroutine is loaded before other modules so that it may be used to report errors when initialising modules.
When running under Mod_Perl this method is replaced.
dump
EPrints->dump( $VAR1 [, $VAR2 ... ] )
Use Data::Dumper to dump the passed variables to STDERR.
new
$ep = EPrints->new();
Construct a new EPrints system object.
repository
$repo = $ep->repository( $repository_id, [%options] );
Return the EPrints::Repository with the given ID, or undef. Options are... optional.
Options noise=>1, etc.
current_repository
$repo = $ep->current_repository();
Returns the current EPrints::Repository. The current repository is determined by the apache request.
Returns undef if there is no current repository active.
SEE ALSO
COPYRIGHT
Copyright 2000-2011 University of Southampton.
This file is part of EPrints <http://www.eprints.org/>.
EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
EPrints is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with EPrints. If not, see <http://www.gnu.org/licenses/>.