Badger::Workplace - a place to do work
This 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.
directory can be provided to specify the root directory of the workplace.
This 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.
This 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.
The object constructor will fail if the root directory specified via root (or
directory) does not exist.
mkdir option to any true value and the directory will be created automatically.
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.
Returns a Badger::Filesystem::File object for a named files relative to the workplace root.
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
Andy Wardley http://wardley.org/
Copyright (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.