You are viewing the version of this documentation from Perl 5.41.4. This is a development version of Perl.

CONTENTS

NAME

Test::Builder::IO::Scalar - A copy of IO::Scalar for Test::Builder

DESCRIPTION

This is a copy of IO::Scalar which ships with Test::Builder to support scalar references as filehandles on Perl 5.6. Newer versions of Perl simply use open()'s built in support.

Test::Builder can not have dependencies on other modules without careful consideration, so its simply been copied into the distribution.

COPYRIGHT and LICENSE

This file came from the "IO-stringy" Perl5 toolkit.

Copyright (c) 1996 by Eryq. All rights reserved. Copyright (c) 1999,2001 by ZeeGee Software Inc. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Construction

new [ARGS...]

Class method. Return a new, unattached scalar handle. If any arguments are given, they're sent to open().

open [SCALARREF]

Instance method. Open the scalar handle on a new scalar, pointed to by SCALARREF. If no SCALARREF is given, a "private" scalar is created to hold the file data.

Returns the self object on success, undefined on error.

opened

Instance method. Is the scalar handle opened on something?

close

Instance method. Disassociate the scalar handle from its underlying scalar. Done automatically on destroy.

Input and output

flush

Instance method. No-op, provided for OO compatibility.

getc

Instance method. Return the next character, or undef if none remain.