[Bps-public-commit] r15833 - in PerlIO-via-dynamic/trunk: .

clkao at bestpractical.com clkao at bestpractical.com
Mon Sep 8 07:20:23 EDT 2008


Author: clkao
Date: Mon Sep  8 07:20:22 2008
New Revision: 15833

Added:
   PerlIO-via-dynamic/trunk/t/4gc-array.t
Modified:
   PerlIO-via-dynamic/trunk/   (props changed)

Log:
 r195 at mtl:  clkao | 2004-09-16 08:58:55 +0800
 blah


Added: PerlIO-via-dynamic/trunk/t/4gc-array.t
==============================================================================
--- (empty file)
+++ PerlIO-via-dynamic/trunk/t/4gc-array.t	Mon Sep  8 07:20:22 2008
@@ -0,0 +1,29 @@
+#!/usr/bin/perl -w
+use strict;
+use PerlIO::via::dynamic;
+use File::Temp;
+use Test::More tests => 1;
+
+our $unused_destroyed;
+
+sub run_test {
+    my $o = bless {}, 'Unused';
+
+    my $p = PerlIO::via::dynamic->new
+	(untranslate =>
+	 sub { $o->{fnord}++; });
+
+    my $fh = File::Temp->new;
+    $p->via ($fh);
+    print $fh "Foobar\n";
+
+}
+
+run_test ();
+ok ($unused_destroyed);
+
+package Unused;
+
+sub DESTROY {
+    $main::unused_destroyed = 1;
+}



More information about the Bps-public-commit mailing list