in reply to Re: A Tagcloud For Cory Doctorow
in thread A Tagcloud For Cory Doctorow

Can anyone explain how to run this on a Mac?

Replies are listed 'Best First'.
Re^3: A Tagcloud For Cory Doctorow
by gnuchu (Novice) on May 11, 2009 at 10:26 UTC
    To start with, you have to make sure your perl installation supports the modules that the scripts uses.
    I'm doing this from Windows but in theory it should be the same for Mac.

    - Open a terminal session.
    - Run:
    ppm list
    - This will show you all of the modules that are installed.
    - If any of:
    HTML::TagCloud
    HTML::Entities
    HTTP::Server::Simple::CGI

    are missing use the command:

    ppm install <module_name_from_above>

    to install the module.

    - HTTP::Server::Simple::CGI doesn't seem to be available via ppm - I guess because it is still developmental. I had to download direct from cpan and manually install.*

    Then, when all installed quite simply:
    perl -w tagcloud.pl notes.txt


    * Manual HTTP::Server::Simple::CGI install.
    - Download from: http://search.cpan.org/dist/HTTP-Server-Simple/lib/HTTP/Server/Simple/CGI.pm
    perl Makefile.PL
    make
    make install


      I'm doing this from Windows but in theory it should be the same for Mac.
      Er... only if you've installed ActiveState's Perl on your Mac. But no worries - Mac OS X, being a Unix, comes with a native Perl install. (Which, incidentally, is what I developed the script on.)

      I've used Platypus to create an OS X application of the script, which bundles the dependent modules in the app. You can download it here at my cell. I changed the script slightly to specify the notes file via the web interface.

        Oh, dear. I only just saw this now.

        But the mcd.perlmonk.org links are hitting a status page that has apparently been up since 2005. The IP address given there goes to a wiki that doesn't immediately appear to contain your script.

        I did try searching around on the wiki but didn't see any likely candidates.

      I've been poking at this for a day now and am still struggling, so any further help would be appreciated.

      I don't see HTML::Entities in my ppm list output, but when I run ppm install HTML::Entities, I get "No missing packages to install". ppm install worked for HTML::TagCloud, so I have reason to think I'm doing that much right, but HTML::Entities continues to not show up. Is there a ppm configuration I need to set that determines the packages I see?

      My Perl installation seems faulty somehow, however, as running perl Makefile.PL tells me Install.pm can't be located, and indeed, it doesn't appear in any of the likely locations ("/usr/local/ActivePerl-5.10/lib/Module/" was the closest I got, but it's not there, nor in any of the other locations perl is trying to find it). I have hunted around for better info on this error, but haven't found anything either on the ActivePerl forums or Perl.org, or perlmonks itself, or any of the other likely sites.

      I love this idea and would get a lot of use out of it, but I think it's just beyond my technical grasp. Any help would be greatly appreciated. Thanks!