Difference between revisions of "API:EPrints"
Line 18: | Line 18: | ||
==SYNOPSIS== | ==SYNOPSIS== | ||
use EPrints qw(); | use EPrints qw(); | ||
+ | |||
+ | # don't check current user (CLI only) | ||
+ | use EPrints qw( no_check_user ); | ||
$eprints = EPrints->new; | $eprints = EPrints->new; | ||
Line 27: | Line 30: | ||
$repo = $eprints->current_repository; | $repo = $eprints->current_repository; | ||
− | ... | + | if( EPrints->VERSION() gt v3.2.0 ) |
+ | { | ||
+ | ... | ||
+ | } | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
Line 64: | Line 70: | ||
Do not check the current user/group is the same as the user/group in SystemSettings. | Do not check the current user/group is the same as the user/group in SystemSettings. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
Line 156: | Line 145: | ||
<!-- Pod2Wiki= --> | <!-- Pod2Wiki= --> | ||
</div> | </div> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki=item_version --> |
− | === | + | ===version=== |
− | + | $version = EPrints->VERSION() | |
− | Returns | + | Returns the version of EPrints in 'v' format. |
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> |
Revision as of 17:26, 31 December 2010
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.
METHODS
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.
new
$ep = EPrints->new();
Construct a new EPrints system object.
repository
$repo = $ep->repository( $repository_id, %options );
Return the repository with the given ID, or undef. Options are... optional.
Options noise=>1, etc.
current_repository
$repo = $ep->current_repository();
Returns the current repository.
Returns undef if there is no current repository active.
version
$version = EPrints->VERSION()
Returns the version of EPrints in 'v' format.
SEE ALSO
COPYRIGHT
__COPYRIGHT__
Copyright 2000-2008 University of Southampton. All Rights Reserved.
__LICENSE__