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~775 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=f82ec5f3981f549c42123663d7b12af1b6aaf693;p=irspy-moved-to-github.git 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