From owner-freebsd-ports Tue Nov 12 18:30: 6 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F6E037B401 for ; Tue, 12 Nov 2002 18:30:02 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D0DCA43E75 for ; Tue, 12 Nov 2002 18:30:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id gAD2U1x3058455 for ; Tue, 12 Nov 2002 18:30:01 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id gAD2U1KK058454; Tue, 12 Nov 2002 18:30:01 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E3A137B401 for ; Tue, 12 Nov 2002 18:26:48 -0800 (PST) Received: from fs.quynh-and-brian.org (dsl-64-131-121-185.telocity.com [64.131.121.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A24943E77 for ; Tue, 12 Nov 2002 18:26:44 -0800 (PST) (envelope-from bgs@fs.quynh-and-brian.org) Received: (qmail 89458 invoked by uid 1001); 8 Nov 2002 22:26:41 -0000 Message-Id: <20021108222641.89457.qmail@fs.quynh-and-brian.org> Date: 8 Nov 2002 22:26:41 -0000 From: Brian Skrab Reply-To: Brian Skrab To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/45255: New port: Perl Class::Hook trace method calls to other classes Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 45255 >Category: ports >Synopsis: New port: Perl Class::Hook trace method calls to other classes >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Nov 12 18:30:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Brian Skrab >Release: FreeBSD 4.7-RELEASE i386 >Organization: disorganization >Environment: System: FreeBSD fs.quynh-and-brian.org 4.7-RELEASE FreeBSD 4.7-RELEASE #1: Sun Oct 27 20:55:39 EST 2002 toor@fs.quynh-and-brian.org:/usr/src/sys/compile/FS i386 >Description: Perl module Class::Hook enables you to trace methods calls from your code to other classes. >How-To-Repeat: >Fix: --- ports.p5-Class-Hook.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # p5-Class-Hook # p5-Class-Hook/Makefile # p5-Class-Hook/distinfo # p5-Class-Hook/pkg-comment # p5-Class-Hook/pkg-descr # p5-Class-Hook/pkg-plist # echo c - p5-Class-Hook mkdir -p p5-Class-Hook > /dev/null 2>&1 echo x - p5-Class-Hook/Makefile sed 's/^X//' >p5-Class-Hook/Makefile << 'END-of-p5-Class-Hook/Makefile' X# New ports collection makefile for: p5-Class-Hook X# Date created: Fri Nov 7 19:40:58 EST 2002 X# Whom: Brian Skrab X# X# $FreeBSD$ X# X XPORTNAME= Class-Hook XPORTVERSION= 0.01 XCATEGORIES= devel perl5 XMASTER_SITES= ${MASTER_SITE_PERL_CPAN} \ X http://cottage.quynh-and-brian.org/freebsd/ports/distfiles/ XMASTER_SITE_SUBDIR= Class XPKGNAMEPREFIX= p5- X XMAINTAINER= brian@quynh-and-brian.org X XBUILD_DEPENDS= ${SITE_PERL}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes X XPERL_CONFIGURE= yes X XMAN3= Class::Hook.3 XMANPREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION} X XSITE_PERL= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH} X X.include END-of-p5-Class-Hook/Makefile echo x - p5-Class-Hook/distinfo sed 's/^X//' >p5-Class-Hook/distinfo << 'END-of-p5-Class-Hook/distinfo' XMD5 (Class-Hook-0.01.tar.gz) = 2673eaf63bd9beb587c0425418fa926e END-of-p5-Class-Hook/distinfo echo x - p5-Class-Hook/pkg-comment sed 's/^X//' >p5-Class-Hook/pkg-comment << 'END-of-p5-Class-Hook/pkg-comment' XAdd hooks on methods from other classes END-of-p5-Class-Hook/pkg-comment echo x - p5-Class-Hook/pkg-descr sed 's/^X//' >p5-Class-Hook/pkg-descr << 'END-of-p5-Class-Hook/pkg-descr' XClass::Hook enables you to trace methods calls from your code to other classes. X XInstead of putting 'use Foo;' in your code, simply type 'use Class::Hook;'. XThe class Foo is unknown in your code. It will be magically catched by XClass::Hook which will call Foo itself. You can see Class::Hook as a kind of Xrelay. X XYou can setup a subroutine to be called before any call to Foo->amethod and a Xsubroutine to be called after the call. Your subs will receive all the Xinformation that Foo->amethod will receive, so you can trace everything Xbetween your code and Foo. X XWWW: http://search.cpan.org/search?dist=Class-Hook X X~brian skrab X brian@quynh-and-brian.org END-of-p5-Class-Hook/pkg-descr echo x - p5-Class-Hook/pkg-plist sed 's/^X//' >p5-Class-Hook/pkg-plist << 'END-of-p5-Class-Hook/pkg-plist' Xlib/perl5/site_perl/%%PERL_VER%%/Class/Hook.pm Xlib/perl5/site_perl/%%PERL_VER%%/Class/FOO.pm Xlib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Class/Hook/.packlist X@dirrm lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Class/Hook X@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Class 2>/dev/null || true X@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/Class 2>/dev/null || true END-of-p5-Class-Hook/pkg-plist exit --- ports.p5-Class-Hook.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message