aboutsummaryrefslogtreecommitdiff
path: root/devel/Makefile
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2012-07-30 19:22:48 +0000
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2012-07-30 19:22:48 +0000
commite03aa71b33d9fed6046c046c0d12d12263d2cdb0 (patch)
treeb035916854f95ffa61f1c5ba5607096840eb80a1 /devel/Makefile
parentf742136b2356643020f7afb058b1f829ad0a3d4e (diff)
- Add p5-Safe-Isa 1.000002
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. WWW: http://search.cpan.org/dist/Safe-Isa/
Notes
Notes: svn path=/head/; revision=301743
Diffstat (limited to 'devel/Makefile')
-rw-r--r--devel/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index c1cb5debabde..58386d70c66d 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -2434,6 +2434,7 @@
SUBDIR += p5-SVN-Simple
SUBDIR += p5-SVN-Statistics
SUBDIR += p5-SVN-Web
+ SUBDIR += p5-Safe-Isa
SUBDIR += p5-Scalar-Defer
SUBDIR += p5-Scalar-Listify
SUBDIR += p5-Scalar-String