From: Mike Taylor Date: Thu, 16 Nov 2006 17:18:43 +0000 (+0000) Subject: Add render() method and overload stringification to use it. X-Git-Tag: CPAN-v1.02~54^2~720 X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=commitdiff_plain;h=c0cb4749c7a7e4dc041795c70b73ffa6e5d70c86 Add render() method and overload stringification to use it. --- 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