Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Port of Perl 5 module Text-Tabs+Wrap

branch: master


Text-Tabs-Wrap is a port of the Perl 5 Text-Tabs+Wrap distribution to Perl 6. The API is slightly different because we have all the Perl 6 bells and whistles, but the module should behave the same (i.e. the original testcases are still used and should pass cleanly).

Text::Tabs provides the expand and unexpand functions, which perform the same job that the Unix expand(1) and unexpand(1) commands do: adding or removing tabs from a document.

Text::Wrap gives you wrap and fill functions. wrap will break up long lines; it doesn't join short lines together. fill reformats entire blocks of text, similar to vi's gq command.

Current status (2013-06-03)

Works on Rakudo (tested on version 2013.05-207-g2367dad) and Niecza Perl 6 (v24-62-g95dde43) equally well. That is to say, both currently fail the same few tests.

The code tries hard to avoid Rakudoisms or Nieczaisms and should work in any reasonably spec-compliant implementation, but there are a few ugly workarounds in the code to make it work in those two (which we'd really like to get rid of).

Anything that requires lots of word-breaking action is currently painfully slow in Rakudo. t/belg4mit.t in particular will take ages to run.


If you're using a Perl compatible with it, installing via Panda is recommended.

If you prefer to do things manually instead, you can run the test suite like so:

PERL6LIB="lib:path/to/Test-Corpus/lib" prove -e perl6
PERL6LIB="lib:path/to/Test-Corpus/lib" prove -e 'mono path/to/Niecza.exe'


Takadonet did the initial porting work from Perl 5 to 6, and flussence rewrote everything to look nicer.

The original Perl 5 code was created by David Muir Sharnoff.

Something went wrong with that request. Please try again.