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
EPrints::URL - URL utility methods
This module contains utility methods for generating and getting URLs, relative paths etc.
use EPrints; my $base_url = $session->get_url->get( scheme => "auto", host => 1, path => "cgi", query => 0, );
$url = $url->get( %opts [, $page ] )
Constructs a $url based on the current configuration and %opts. If $page is specified will return a URL to that page.
- scheme => "auto"
- Link to same protocol as is active now (N/A to shell scripts).
- scheme => "http"
- Link to the non-secure location.
- scheme => "https"
- Link to the secure location (or http if
- host => 1
- Create an absolute link (including host and port).
- path => "auto"
- Use the current path (N/A to shell scripts).
- path => "static", path => "cgi", path => "images"
- Link to the root of the static, cgi and images respectively.
- query => 1
- Create a self-referential link (i.e. include all parameters in the query part).
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/.