From c0cb4749c7a7e4dc041795c70b73ffa6e5d70c86 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 16 Nov 2006 17:18:43 +0000 Subject: [PATCH] Add render() method and overload stringification to use it. --- lib/ZOOM/IRSpy/Connection.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/ZOOM/IRSpy/Connection.pm b/lib/ZOOM/IRSpy/Connection.pm index 0ad9c2b..0e32c8b 100644 --- a/lib/ZOOM/IRSpy/Connection.pm +++ b/lib/ZOOM/IRSpy/Connection.pm @@ -1,4 +1,4 @@ -# $Id: Connection.pm,v 1.6 2006-10-25 15:43:43 mike Exp $ +# $Id: Connection.pm,v 1.7 2006-11-16 17:18:43 mike Exp $ package ZOOM::IRSpy::Connection; @@ -143,6 +143,14 @@ sub add_task { } +sub render { + my $this = shift(); + return ref($this) . "(" . $this->option("host") . ")"; +} + +use overload '""' => \&render; + + =head1 SEE ALSO ZOOM::IRSpy -- 1.7.10.4