孙海军 > Shipwright > Shipwright::Util

Download:
Shipwright-2.4.40.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

LIST ^

General Helpers

load_yaml, load_yaml_file, dump_yaml, dump_yaml_file

they are just dropped in from YAML::Tiny

confess_or_die

parent_dir

return the dir's parent dir, the arg must be a dir path

run_cmd

a wrapper of run3 sub in IPC::Run3.

select_fh

wrapper for the select in core

find_module

Takes perl modules name space and name of a module in the space. Finds and returns matching module name using case insensitive search, for example:

    find_module('Shipwright::Backend', 'svn');
    # returns 'Shipwright::Backend::SVN'

    find_module('Shipwright::Backend', 'git');
    # returns 'Shipwright::Backend::Git'

Returns undef if there is no module matching criteria.

PATHS

shipwright_root

Returns the root directory that Shipwright has been installed into. Uses %INC to figure out where Shipwright.pm is.

share_root

Returns the 'share' directory of the installed Shipwright module. This is currently only used to store the initial files in project.

user_home

return current user's home directory

shipwright_user_root

the user's own shipwright root where we put internal files in. it's ~/.shipwright by default. it can be overwritten by $ENV{SHIPWRIGHT_USER_ROOT}

NAME ^

Shipwright::Util - Util

AUTHOR ^

sunnavy <sunnavy@bestpractical.com>

LICENCE AND COPYRIGHT ^

Copyright 2007-2012 Best Practical Solutions.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: