Description | A static content generator. |
Newcomen::URL - Manages an URL map.
use Newcomen::URL; my $urls = Newcomen::URL -> new (); # Define an URL: $urls -> set (['some', 'index'], 'some/index.html'); # Retrieve an URL: my $url = $urls -> get (['some', 'index']);
Newcomen::URL provides a storage to map arbitrary (and maybe nested) keys to an URL. Right now it is really only a wrapper around Newcomen::Data, and does nothing more than that (it does in fact less, since the interface doesn't even provide all Newcomen::Data methods).
my $urls = Newcomen::URL -> new ();
Constructor. Expects no parameters. The URL map will be empty initially.
The following methods are available and behave exactly like their Newcomen::Data counterparts: delete(), exists(), get(), merge(), set(). Additionally, the Newcomen::URL method map() is mapped to Newcomen::Data's data() method. There is no method to access the Newcomen::Data instance directly.
This is version 2014052501
.
Stefan Goebel - newcomen {at} subtype {dot} de
Copyright 2013-2014 Stefan Goebel.
This file is part of Newcomen.
Newcomen is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the license, or (at your option) any later version.
Newcomen 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with Newcomen. If not, see <http://www.gnu.org/licenses/>.