Added PBS::Setup::Std, the root of all Setup's

Signed-off-by: Pedro Melo <melo@simplicidade.org>
Added PBS::Setup::Tests

Signed-off-by: Pedro Melo <melo@simplicidade.org>
Added PBS::Setup::Lib

Signed-off-by: Pedro Melo <melo@simplicidade.org>
Move dev/ to its proper place

Signed-off-by: Pedro Melo <melo@simplicidade.org>
Added PBS::Setup

Signed-off-by: Pedro Melo <melo@simplicidade.org>
Add PBS::Setup Moo and MooRole classes

Signed-off-by: Pedro Melo <melo@simplicidade.org>
Added PBS::Setup::Script

Signed-off-by: Pedro Melo <melo@simplicidade.org>
Added PBS::Setup::Exporter

Signed-off-by: Pedro Melo <melo@simplicidade.org>
Add multiple options support to PBS::Setup::Script:

If a single argument is present like the previous version, it assumes it is
the environment to use. But you can then pass a list of key/value options.

You can even mix the two. Valid uses:

    use PBS::Setup::Script 'my_env';
    use PBS::Setup::Script env => 'my_env', opt1 => 'val1';
    use PBS::Setup::Script 'my_env', opt1 => 'val1';

Signed-off-by: Pedro Melo <melo@simplicidade.org>
Add option chdir_to_root to PBS::Setup::Script

If true, it will chdir() to the project root.

Signed-off-by: Pedro Melo <melo@simplicidade.org>
Added PBS::Roles::PerClassSingleton

Signed-off-by: Pedro Melo <melo@simplicidade.org>
Stop using undocumented export_to_level, switch to Import::Into

Signed-off-by: Pedro Melo <melo@simplicidade.org>
Brave but failed attempt:

added comment to explain my future self not to try it again.

Signed-off-by: Pedro Melo <melo@simplicidade.org>
My future self is smarter than me, found Import::Into and all is fine now

Signed-off-by: Pedro Melo <melo@simplicidade.org>
Find deps on the standard $PROJECT_ROOT/../deps and insert them in proper place

Signed-off-by: Pedro Melo <melo@simplicidade.org>
Added experimental 'switch' to our Std imports

Signed-off-by: Pedro Melo <melo@simplicidade.org>
PBS::Setup::Script extends PBS::Setup, gains env and root_dir methods

Signed-off-by: Pedro Melo <melo@simplicidade.org>
When setting up our local::lib-based deps, update PATH and PERL5LIB:

This propagates our deps to any process that is exec'ed from our code, so
that those scripts also have access to our deps.

Signed-off-by: Pedro Melo <melo@simplicidade.org>
Update env() on ::Setup to support "auto" environment, the new default:

If no PROJECT_ENV or :env is defined, we now try to figure out the
PROJECT_ENV to set using this rules:

* if <project_root>/.git exists, set env as "devel";
* if <project_root>/.deployed_env exists, read it and use the first line
  as our env.

If none match, the process dies.

Signed-off-by: Pedro Melo <melo@simplicidade.org>
Merge remote-tracking branch 'libs/master'

* libs/master:
  Update env() on ::Setup to support "auto" environment, the new default:
  When setting up our local::lib-based deps, update PATH and PERL5LIB:
  PBS::Setup::Script extends PBS::Setup, gains env and root_dir methods
  Added experimental 'switch' to our Std imports
  Find deps on the standard $PROJECT_ROOT/../deps and insert them in proper place
  My future self is smarter than me, found Import::Into and all is fine now
  Brave but failed attempt:
  Stop using undocumented export_to_level, switch to Import::Into
  Added PBS::Roles::PerClassSingleton
  Add option chdir_to_root to PBS::Setup::Script
  Add multiple options support to PBS::Setup::Script:
  Added PBS::Setup::Exporter
  Added PBS::Setup::Script
  Add PBS::Setup Moo and MooRole classes
  Added PBS::Setup
  Move dev/ to its proper place
  Added PBS::Setup::Lib
  Added PBS::Setup::Tests
  Added PBS::Setup::Std, the root of all Setup's