SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

perl-Safe-Isa rpm build for : OpenSuSE. For other distributions click perl-Safe-Isa.

Name : perl-Safe-Isa
Version : 1.000010 Vendor : obs://build_opensuse_org/devel:languages:perl
Release : lp155.16.3 Date : 2023-05-17 15:15:26
Group : Development/Libraries/Perl Source RPM : perl-Safe-Isa-1.000010-lp155.16.3.src.rpm
Size : 0.01 MB
Packager : https://www_suse_com/
Summary : Call isa, can, does and DOES safely on things that may not be objects
Description :
How many times have you found yourself writing:

if ($obj->isa(\'Something\')) {

and then shortly afterwards cursing and changing it to:

if (Scalar::Util::blessed($obj) and $obj->isa(\'Something\')) {

Right. That\'s why this module exists.

Since perl allows us to provide a subroutine reference or a method name to
the -> operator when used as a method call, and a subroutine doesn\'t
require the invocant to actually be an object, we can create safe versions
of isa, can and friends by using a subroutine reference that only tries to
call the method if it\'s used on an object. So:

my $isa_Foo = $maybe_an_object->$_call_if_object(isa => \'Foo\');

is equivalent to

my $isa_Foo = do {
if (Scalar::Util::blessed($maybe_an_object)) {
$maybe_an_object->isa(\'Foo\');
} else {
undef;
}
};

Note that we don\'t handle trying class names, because many things are valid
class names that you might not want to treat as one (like say \"Matt\") - the
\'is_module_name\' function from Module::Runtime is a good way to check for
something you might be able to call methods on if you want to do that.

We are careful to make sure that scalar/list context is preserved for the
method that is eventually called.

RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl/15.5/noarch

Content of RPM  Changelog  Provides Requires

Download
ftp.icm.edu.pl  perl-Safe-Isa-1.000010-lp155.16.3.noarch.rpm
     

Provides :
perl(Safe::Isa)
perl-Safe-Isa

Requires :
perl(:MODULE_COMPAT_5.26.1)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1


Content of RPM :
/usr/lib/perl5/vendor_perl/5.26.1/Safe
/usr/lib/perl5/vendor_perl/5.26.1/Safe/Isa.pm
/usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi
/usr/share/doc/packages/perl-Safe-Isa
/usr/share/doc/packages/perl-Safe-Isa/Changes
/usr/share/doc/packages/perl-Safe-Isa/README
/usr/share/man/man3/Safe::Isa.3pm.gz

 
ICM