Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Module Text::Autoformat not working; perlbrew not installing

by marek1703 (Acolyte)
on Oct 26, 2015 at 10:55 UTC ( [id://1145942]=perlquestion: print w/replies, xml ) Need Help??

marek1703 has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks!

I have a serious issue with my Module Text::Autoformat

I tried to reinstall it on my MacOS (10.10.5) original Perl 5.18.2 installation.

In Shell I issued the following command - as suggested in the man -

perl -MText::Autoformat -e'autoformat'

pasting one of the examples of the man:

1. Analyze problem
3. Design algorithm
1. Code solution
5. Test
4. Ship

then ctrl D with the result: the shell is spitting out just the same, what I pasted in.
Right procedure like that?

Than I tried the following script:

#!/usr/bin/perl use strict; use warnings; use Text::Autoformat; $/ = ''; my $formatted = <DATA>; autoformat $formatted; print $formatted; __DATA__ 1. Analyze problem 3. Design algorithm 1. Code solution 5. Test 4. Ship

Right the script? Here too the result: the same what I put in was printed out, without any change.
After this deception, I decided to install perlbrew and the newest Perl-Version. But here too, I have a big issue, which I am not able to solve myself: the installation finishes with a link error:

/Applications/Xcode.app/Contents/Developer/usr/bin/make all PERL_CORE= +1 LIBPERL_A=libperl.a LINKTYPE=dynamic<br> rm -f ../../lib/auto/B/B.bundle<br> env MACOSX_DEPLOYMENT_TARGET=10.3 cc -bundle -undefined dynamic_looku +p -L/usr/local/lib -fstack-protector B.o -o ../../lib/auto/B/B.bundl +e<br> ...<br> ld: library not found for -lgcc_s.10.4<br> clang: error: linker command failed with exit code 1 (use -v to see in +vocation)

Any help? I would be very gratefull!

marek

Replies are listed 'Best First'.
Re: Module Text::Autoformat not working
by hippo (Bishop) on Oct 26, 2015 at 11:11 UTC

    You are discarding the results of the formatting operation. Instead, store them as indicated in the synopsis:

    $formatted = autoformat $formatted;

    HTH

    Update: link fix

      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

      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.

        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 :(

Re: perlbrew not installing
by hippo (Bishop) on Oct 26, 2015 at 11:15 UTC
    ld: library not found for -lgcc_s.10.4

    That seems pretty explicit. Either install the correct library or else amend the initial configuration to point to an already-installed compatible library.

      Thank you dear monks! This was a good help!
      My test script looks now like follows - and is working

      #!/usr/bin/perl use strict; use warnings; use Text::Autoformat; $/ = ''; my $messy = <DATA>; my $formatted = autoformat($messy, {all=>1}); print $formatted; __DATA__ 1. Analyze problem 3. Design algorithm 1. Code solution 5. Test 4. Ship

      I would like nevertheless install a newer Perl with perlbrew

      Could somebody help me with the linker problem? My Xcode is the newest version ...

      marek

Re: Module Text::Autoformat not working; perlbrew not installing
by marto (Cardinal) on Oct 26, 2015 at 14:37 UTC

      Thanks again!

      I am just realising that I have only Xcode 6.4 although the autoupdate is checked. I will install the newest version and I will see whether it works.

      Best greetings from Munich
      marek

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1145942]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-24 17:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found