BSD Ports

devel/p5-Safe-Isa 1.000010 FreeBSD

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

System
FreeBSD
Repository
FreeBSD ports
Maintainer
[email protected]
License
ART10, GPLv1+
Categories
devel, perl5
Package size
8.7 KiB, 14.6 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

SystemPortVersion
FreeBSDdevel/p5-Safe-Isa1.000010
OpenBSDdevel/p5-Safe-Isa1.000010p0
NetBSDdevel/p5-Safe-Isa1.000010nb9
DragonFlydevel/p5-Safe-Isa1.000010
MidnightBSDdevel/p5-Safe-Isa1.000010
HardenedBSDdevel/p5-Safe-Isa1.000010
GhostBSDdevel/p5-Safe-Isa1.000010

Install

Binary package:

pkg install p5-Safe-Isa

From the ports tree:

cd /usr/ports/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

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest1.0000101.0000101.0000101.0000101.000010
FreeBSD:14:quarterly1.0000101.000010n/a1.0000101.000010
FreeBSD:15:latest1.0000101.000010n/a1.0000101.000010
FreeBSD:15:quarterly1.0000101.000010n/an/an/a
FreeBSD:16:latest1.0000101.000010n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

The Makefile names none itself; they come from USES and USE_*.

The full lists below include those, and their dependencies in turn.

Build dependencies 1
Run dependencies 1
Required by 227

The first 100 are listed.

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

Commit history 0

No commits in the history this site was built from.