Starch::Util - Utility functions used internally by Starch.
This is a custom Carp croak function which sets various standard starch packages as Internal so that Carp looks deeper in the stack for something to blame which makes exceptions be more contextually useful for users of Starch and means we don't need to use confess which generates giant stack traces.
croak
Internal
# These both return "Foo::Bar". my $module = load_prefixed_module( 'Foo', '::Bar' ); my $module = load_prefixed_module( 'Foo', 'Foo::Bar' );
Takes a prefix to be appended to a relative package name and a relative or absolute package name. It then resolves the relative package name to an absolute one, loads it, and returns the absolute name.
Given a data structures (array ref or hash ref) this will recursively find all method proxies, call them, and insert the return value back into the data structure.
This creates a new data structure and does not modify the original.
my @ret = call_method_proxy( [ '&proxy' 'Some::Package', 'some_method', @args, ], );
Is the same as:
require Some::Package; my @ret = Some::Package->some_method( @args );
Method proxies are defined in more detail at "METHOD PROXIES" in Starch::Manual.
is_method_proxy( [ 'Foo', 'bar' ] ); # false is_method_proxy( [ '&proxy', 'Foo', 'bar' ] ); # true
Returns true if the passed value is an array ref where the first value is &proxy.
&proxy
See "AUTHOR" in Starch, "CONTRIBUTORS" in Starch, and "LICENSE" in Starch.
To install Starch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Starch
CPAN shell
perl -MCPAN -e shell install Starch
For more information on module installation, please visit the detailed CPAN module installation guide.