The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more

NAME

Chj::Packages

SYNOPSIS

package_to_requirepath
require_package
fallible_require_package_by_path
xrequire_package_by_path
);
my $packagename = "Chj::Packages";
my $possibly_previously_loaded_path = require_package $packagename;
my $true_or_failure = fallible_require_package_by_path $packagename;
# xrequire_package_by_path turns the failure into an exception.
# related (mess?):
# use FP::Predicates qw($package_re);

DESCRIPTION

Dealing with packages, and their loading, yet again.

TODO

What is the proper upstream way? And do I have other code somewhere?

Also, FP::Fallible may not be the best idea (instead make a proper sum type and offer an `Ok` value? A modified FP::Either?)

SEE ALSO

FP::Fallible

NOTE

This is alpha software! Read the status section in the package README or on the website.