|
NAMEBadger::Workplace - a place to do workDESCRIPTIONThis is a very simple base class for modules that operate on or around a particular filesystem directory. See Badger::Config::Filesystem for an example of it in us.CONFIGURATION OPTIONSroot / dir / directoryAny of "root", "dir" or "directory" can be provided to specify the root directory of the workplace.urnThis option can be set to define a Universal Resource Name (URN) for the workplace for reference purposes. If undefined it defaults to the name of the root directory.uriThis option can be set to define a Universal Resource Identifier (URN) for the workplace for reference purposes. If undefined it defaults to the name of the value of urn.mkdirThe object constructor will fail if the root directory specified via root (or "dir" or "directory") does not exist. Alternately, set the "mkdir" option to any true value and the directory will be created automatically.METHODSdir($name) / directory($name)Returns a Badger::Filesystem::Directory object for a named sub-directory relative to the workplace root.When called with any arguments it returns a Badger::Filesystem::Directory object for the workplace root directory. file($name)Returns a Badger::Filesystem::File object for a named files relative to the workplace root.uri($path)When called without any arguments this method returns the base URI for the workspace.print $workspace->uri; # e.g. foo When called with a relative URI path as an argument, it returns the URI resolved relative to the project base URI. print $workspace->uri('bar'); # e.g. foo/bar AUTHORAndy Wardley <http://wardley.org/>COPYRIGHTCopyright (C) 2008-2014 Andy Wardley. All Rights Reserved.This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Visit the GSP FreeBSD Man Page Interface. |