summaryrefslogtreecommitdiff
path: root/t/lib/TieOut.pm
diff options
context:
space:
mode:
Diffstat (limited to 't/lib/TieOut.pm')
-rw-r--r--t/lib/TieOut.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/lib/TieOut.pm b/t/lib/TieOut.pm
new file mode 100644
index 0000000000..0da80cbb0e
--- /dev/null
+++ b/t/lib/TieOut.pm
@@ -0,0 +1,17 @@
+package TieOut;
+
+sub TIEHANDLE {
+ bless( \(my $scalar), $_[0]);
+}
+
+sub PRINT {
+ my $self = shift;
+ $$self .= join('', @_);
+}
+
+sub read {
+ my $self = shift;
+ return substr($$self, 0, length($$self), '');
+}
+
+1;