Skip to content
This repository has been archived by the owner on May 14, 2023. It is now read-only.

hoelzro/p6-io-string

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
t
 
 
 
 
 
 
 
 
 
 
 
 

TITLE

IO::String

SYNOPSIS

        use IO::String;

        my $buffer = IO::String.new;
        {
            my $*OUT = $buffer;
            say "hello";
        }
        say ~$buffer; # hello

DESCRIPTION

Sometimes you want to use code that deals with files (or other file-like objects), but you don't want to mess around with creating temporary files. This includes uses like APIs that for some reason don't accept strings as well as files as targets, mocking I/O, or capturing output written to the terminal. That's why this module exists. Loosely based on Perl 5's IO::String.

TODO

  • Input as well as output
  • Handle encodings

About

IO::String for Perl6

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages

  • Other 100.0%