Skip to content

Commit

Permalink
New port: Perl Class::Hook trace method calls to other classes
Browse files Browse the repository at this point in the history
	Perl module Class::Hook enables you to trace methods calls
	from your code to other classes.

PR:		ports/45255
Submitted by:	Brian Skrab <[email protected]>
  • Loading branch information
Edwin Groothuis authored and Edwin Groothuis committed Feb 5, 2003
1 parent 65dd050 commit a2ab06d
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions devel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@
SUBDIR += p5-Class-Factory-Util
SUBDIR += p5-Class-Fields
SUBDIR += p5-Class-Generate
SUBDIR += p5-Class-Hook
SUBDIR += p5-Class-ISA
SUBDIR += p5-Class-Inner
SUBDIR += p5-Class-Inspector
Expand Down
27 changes: 27 additions & 0 deletions devel/p5-Class-Hook/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# New ports collection makefile for: p5-Class-Hook
# Date created: Fri Nov 7 19:40:58 EST 2002
# Whom: Brian Skrab <[email protected]>
#
# $FreeBSD$
#

PORTNAME= Class-Hook
PORTVERSION= 0.01
CATEGORIES= devel perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN} \
http://cottage.quynh-and-brian.org/freebsd/ports/distfiles/
MASTER_SITE_SUBDIR= Class
PKGNAMEPREFIX= p5-

MAINTAINER= [email protected]

BUILD_DEPENDS= ${SITE_PERL}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes

PERL_CONFIGURE= yes

MAN3= Class::Hook.3
MANPREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION}

SITE_PERL= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}

.include <bsd.port.mk>
1 change: 1 addition & 0 deletions devel/p5-Class-Hook/distinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MD5 (Class-Hook-0.01.tar.gz) = 2673eaf63bd9beb587c0425418fa926e
1 change: 1 addition & 0 deletions devel/p5-Class-Hook/pkg-comment
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add hooks on methods from other classes
16 changes: 16 additions & 0 deletions devel/p5-Class-Hook/pkg-descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Class::Hook enables you to trace methods calls from your code to other classes.

Instead of putting 'use Foo;' in your code, simply type 'use Class::Hook;'.
The class Foo is unknown in your code. It will be magically catched by
Class::Hook which will call Foo itself. You can see Class::Hook as a kind of
relay.

You can setup a subroutine to be called before any call to Foo->amethod and a
subroutine to be called after the call. Your subs will receive all the
information that Foo->amethod will receive, so you can trace everything
between your code and Foo.

WWW: http://search.cpan.org/search?dist=Class-Hook

~brian skrab
[email protected]
6 changes: 6 additions & 0 deletions devel/p5-Class-Hook/pkg-plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
lib/perl5/site_perl/%%PERL_VER%%/Class/Hook.pm
lib/perl5/site_perl/%%PERL_VER%%/Class/FOO.pm
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Class/Hook/.packlist
@dirrm lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Class/Hook
@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Class 2>/dev/null || true
@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/Class 2>/dev/null || true

0 comments on commit a2ab06d

Please sign in to comment.