Add render() method and overload stringification to use it.
[irspy-moved-to-github.git] / lib / ZOOM / IRSpy / Connection.pm
index 0ad9c2b..0e32c8b 100644 (file)
@@ -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