Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Module Text::Autoformat not working

by parv (Vicar)
on Oct 26, 2015 at 11:28 UTC ( #1145945=note: print w/replies, xml ) Need Help??


in reply to Re: Module Text::Autoformat not working
in thread Module Text::Autoformat not working; perlbrew not installing

No worky here; explicit lists & renumber options do not make any difference.

# perl -MText::Autoformat -e 'print $Text::Autoformat::VERSION , "\n"' + ; cat p.pl ; echo ; perl p.pl 1.67
#!/usr/local/bin/perl use warnings; use strict; use Text::Autoformat qw[ autoformat ]; my $in = do { local $/; <DATA> }; my $opts = { 'lists '=> 'number' , 'renumber' => 1 }; printf "# PRE\n%s\n# POST: text , option\n%s\n# POST: option, text\ +n%s\n" , $in , autoformat( $in , $opts ) , autoformat( $opts , $in ) ; __DATA__ 1. Analyze problem 3. Design algorithm 1. Code solution # PRE 1. Analyze problem 3. Design algorithm 1. Code solution # POST: text , option 1. Analyze problem 3. Design algorithm 1. Code solution # POST: option, text 1. Analyze problem 3. Design algorithm 1. Code solution

Pod seems to be a mess. In "Synopsis", syntax is ...

# Configuration... $formatted = autoformat $rawtext, { %options };

... later in "Bulleting and (re-)numbering" section, it is ...

# Don't recognize Roman numerals or alphabetics as list markers. +.. autoformat { lists => 'number, bullet' }, $text;

Addendum: Problems persists with Text::Autoformat 1.72, latest stable version.

Replies are listed 'Best First'.
Re^3: Module Text::Autoformat not working
by parv (Vicar) on Oct 26, 2015 at 13:42 UTC
Re^3: Module Text::Autoformat not working
by hippo (Chancellor) on Oct 26, 2015 at 11:42 UTC

    I see nothing wrong with your code. Unless we're both misreading the docs it looks to be a bug in the module to be added to the existing list :(

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1145945]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2020-10-27 18:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (257 votes). Check out past polls.

    Notices?