NAME

FindApp::Object::State::Group::Behavior - implement group-specific behaviors for FindApp groups

DESCRIPTION

This class makes up part of the implementation for FindApp::Object groups. It has only two jobs: first, to make sure all the "wanted" constraints are met, and second, export anything need into the user's environment.

Methods

base_has_wanteds PATH

Returns true if all the constaints of the group can be met for the given PATH argument, and false otherwise.

expected_name

Make sure that the expected method has been called on the expected group.

export_bin_to_env

Export any bin directories found into the PATH environment variable. If debugging has been enabled, shows what it is doing while it's doing it.

export_lib_to_env

Calls use lib on any libs found. NOTE: Does not set PERL5LIB.

If debugging has been enabled, shows what it is doing while it's doing it.

export_man_to_env

Export any man directories found into the MANPATH environment variable.

If debugging has been enabled, shows what it is doing while it's doing it.

export_root_to_env

Export the object's app_root to the APP_ROOT environement variable.

If debugging has been enabled, shows what it is doing while it's doing it.

export_to_env

Dispatch method that calls the group-specific exporters just mentioned above. That way you can just say

$group->export_to_env

for any group, and it will automatically call the right one.

ENVIRONMENT

Sets the APP_ROOT, PATH, and MANPATH environment variables, and respects the value of FINDAPP_DEBUG.

SEE ALSO

FindApp

CAVEATS AND PROVISOS

An attempt is made to avoid adding duplicate elements to paths, but you probably don't want to export things more than once, because it doesn't delete old values.

BUGS AND LIMITATIONS

In theory this can be extended via subclassing to more than the four basic directory groups, but this has not been tested.

AUTHOR

Tom Christiansen <tchrist@perl.com>

LICENCE AND COPYRIGHT

Copyright (c) 2016, Tom Christiansen <tchrist@perl.com>. All Rights Reserved.

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