App-GitFind
view release on metacpan or search on metacpan
lib/App/GitFind/Class.pm view on Meta::CPAN
# The internal builder, so I don't have to worry about dispatch
# once our BUILDARGS is called.
sub _app_gitfind_class_builder_internal {
my $class = shift or require Carp, Carp::croak 'Need a class';
if(@_ == 1 && ref $_[0] eq 'HASH') {
@_ = ($class, %{$_[0]});
goto \&_app_gitfind_class_builder_internal;
# No extra stack frame for the sake of croak()
} elsif(@_ == 1 && ref $_[0]) {
require Carp;
Carp::croak "$class\->new(arg) with @{[ref $_[0]]} instead of HASH ref";
} elsif(@_ % 2) {
require Carp;
Carp::croak "Odd number of arguments to $class\->new()";
}
# Now we have key-value pairs. Trim leading hyphens on the keys.
my %args = @_;
( run in 0.831 second using v1.01-cache-2.11-cpan-e1769b4cff6 )