lib::gitroot - locate .git root at compile time and use as lib path
use lib::gitroot qw/:set_root/;
Finds git root and export GIT_ROOT function to current package. Will die if called several times from different places.
use lib::gitroot qw/:lib/;
Finds git root, export GIT_ROOT function to current package and adds GIT_ROOT/lib to @INC. Will die if called several times from different places.
use lib::gitroot qw/:set_root :once/;
Same as :set_root, but will not die if called from different places (instead will use first found GIT_ROOT)
use lib::gitroot qw/:lib :once/;
Similar to :set_root :once
use lib::gitroot lib => 'mylib';
Use GIT_ROOT/mylib instead
use lib::gitroot;
Exports GIT_ROOT hoping that it's set previously or will be set in the future
use lib::gitroot ':lib', use_base_dir => "/some/path";
Use some path, instead of caller filename, for searching for git
Victor Efimov <lt>efimov@reg.ru>.
This software is copyright (c) 2012-2013 by REG.RU LLC
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install lib::gitroot, copy and paste the appropriate command in to your terminal.
cpanm
cpanm lib::gitroot
CPAN shell
perl -MCPAN -e shell install lib::gitroot
For more information on module installation, please visit the detailed CPAN module installation guide.