BSD Ports

devel/p5-Safe-Isa 1.000010 MidnightBSD

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

System
MidnightBSD
Repository
mports
Maintainer
[email protected]
License
artistic, gpl
Categories
devel, perl5

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
MidnightBSDdevel/p5-Safe-Isa1.000010 newestno data-[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
DragonFlydevel/p5-Safe-Isa1.000010 newestnone known-[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:

mport install p5-Safe-Isa

From mports:

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

To depend on this port in another port's Makefile:

RUN_DEPENDS=	p5-Safe-Isa>0:devel/p5-Safe-Isa

Dependency graph

Ports that need it on the left, what it needs to run on the right; at most 8 of each. "Dependencies" below lists them all.

Dependencies

Configuration

No options to configure.

USES
perl5
Service scripts
none

Files

pkg-plist 2
  • %%SITE_PERL%%/Safe/Isa.pm
  • %%PERL5_MAN3%%/Safe::Isa.3.gz
distinfo 1
FileSizeSHA256
Safe-Isa-1.000010.tar.gz654687f4148aa0ff1d5e652723322eab7dafa3801c967d6f91ac9147a3c467b8a66a
Master sites 1
  • CPAN