BSD Ports

devel/p5-Safe-Isa 1.000010 DragonFly

Call isa, can, does and DOES safely on things that may not be objects

System
DragonFly
Repository
DPorts
Maintainer
[email protected] (as in FreeBSD)
License
ART10, GPLv1+
Categories
devel, perl5
Package size
8.2 KiB, 14.9 KiB installed

Description

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.

e.g. my $isa_Foo = $maybe_an_object->$_call_if_object(isa => 'Foo');

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.

In the other systems

The newest version among them is 1.000010, as upstream numbers it.

SystemPortVersionVulnerabilitiesStatusMaintainerLast update
DragonFlydevel/p5-Safe-Isa1.000010 newestnone known-[email protected]-
FreeBSDdevel/p5-Safe-Isa1.000010 newestnone known-[email protected]-
OpenBSDdevel/p5-Safe-Isa1.000010p0 newestno data-The OpenBSD ports mailing-list <[email protected]>-
NetBSDdevel/p5-Safe-Isa1.000010nb9 newestnone known-[email protected]2026-07-16
MidnightBSDdevel/p5-Safe-Isa1.000010 newestno data-[email protected]-
HardenedBSDdevel/p5-Safe-Isa1.000010 newestno data-[email protected]-
GhostBSDdevel/p5-Safe-Isa1.000010 newestno data-[email protected]-

Compare across BSDs

Install

Binary package:

pkg install p5-Safe-Isa

From DPorts:

cd /usr/dports/devel/p5-Safe-Isa && make install clean

Dependencies

Run dependencies 1