AnyData2
view release on metacpan or search on metacpan
Source code for a work means the preferred form of the work for making
modifications to it. For an executable file, complete source code means
all the source code for all modules it contains; but, as a special
exception, it need not include source code for modules which are standard
libraries that accompany the operating system on which the executable
file runs, or for standard header files or definitions files that
accompany that operating system.
4. You may not copy, modify, sublicense, distribute or transfer the
Program except as expressly provided under this General Public License.
Any attempt otherwise to copy, modify, sublicense, distribute or transfer
the Program is void, and will automatically terminate your rights to use
the Program under this License. However, parties who have received
copies, or rights to use copies, from you under this General Public
License will not have their licenses terminated so long as such parties
remain in full compliance.
5. By copying, distributing or modifying the Program (or any work based
on the Program) you indicate your acceptance of this license to do so,
and all its terms and conditions.
lib/AnyData2/Role/GuessImplementation.pm view on Meta::CPAN
=head2 _guess_suitable_class(@suitables)
Finds first suitable class from C<@suitables>. Results are cached.
=cut
my %suitable_classes;
sub _guess_suitable_class
{
my ( $class, @classlist ) = @_;
$suitable_classes{$class} or $suitable_classes{$class} = firstval
{
eval { require_module($_); }
}
@classlist;
$suitable_classes{$class} or croak( "No suitable class out of (" . join( ", ", @classlist ) . ")for $class available" );
$suitable_classes{$class};
}
=head1 LICENSE AND COPYRIGHT
Copyright 2015,2016 Jens Rehsack.
This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.
( run in 0.909 second using v1.01-cache-2.11-cpan-acf6aa7dc9e )