diff options
author | Gisle Aas <gisle@aas.no> | 2010-04-18 22:58:02 +0200 |
---|---|---|
committer | Gisle Aas <gisle@aas.no> | 2010-04-18 22:58:02 +0200 |
commit | f6e2320c520b8d610a864cd42aece1f0df2db895 (patch) | |
tree | 5875a885f9b6ca8baddbcb2b5994fe42ea389ad2 /cpan | |
parent | c20941f7d93435a213fd8cbe392fbc0d6984cb73 (diff) | |
download | perl-f6e2320c520b8d610a864cd42aece1f0df2db895.tar.gz |
Documentation tweaks to Text::Tabs
Diffstat (limited to 'cpan')
-rw-r--r-- | cpan/Text-Tabs/lib/Text/Tabs.pm | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/cpan/Text-Tabs/lib/Text/Tabs.pm b/cpan/Text-Tabs/lib/Text/Tabs.pm index d3c06a08c1..49ec775b58 100644 --- a/cpan/Text-Tabs/lib/Text/Tabs.pm +++ b/cpan/Text-Tabs/lib/Text/Tabs.pm @@ -95,12 +95,16 @@ Text::Tabs -- expand and unexpand tabs per the unix expand(1) and unexpand(1) =head1 SYNOPSIS - use Text::Tabs; + use Text::Tabs qw(expand unexpand); - $tabstop = 4; # default = 8 @lines_without_tabs = expand(@lines_with_tabs); @lines_with_tabs = unexpand(@lines_without_tabs); + { + local $Text::Tabs::tabstop = 4; # default is 8 + @lines_without_tabs = expand(@lines_with_tabs); + } + =head1 DESCRIPTION Text::Tabs does about what the unix utilities expand(1) and unexpand(1) @@ -109,6 +113,12 @@ the appropriate number of spaces. Given a line with or without tabs in it, unexpand will add tabs when it can save bytes by doing so (just like C<unexpand -a>). Invisible compression with plain ASCII! +The global variable C<$Text::Tabs::tabstop> controls how many columns +positions apart each tabstop are. The default is 8. + +The functions expand(), unexpand() as well as the variable $tabstop +are exported by default. + =head1 EXAMPLE #!perl |