Monday, August 24, 2009

Trying Padre on MacOS

For a while wanted to play with Padre. It's IDE writen in perl programming language and at this point its main target is perl developers. I tried it once on windows, but I don't develop on windows. For development I use perl5.8 from MacPorts on MacOS X.

First of all you find that Padre requires threaded perl and it's reasonable requirement. So I had to switch perl. I've deactivated perl5.8 and installed new one with threads using the following commands:

    port deactivate perl5.8
    port install perl5.8 +threads

Sure such things don't work well: binary incompatibility and path changes. CPAN shell died complaining about missing dzopen in Compress::Zlib. Installed manually from the CPAN. Didn't help. So I deleted all directories that may affect things:

    # get rid of old perl files, the current version is 5.8.9
    find /opt/local/lib/perl5 -name '5.8.8' | xargs sudo rm -fr
    # get rid of everything related to compression
    find /opt/local/lib/perl5 | grep 'Compress' | xargs sudo rm -fr
    # get rid of everything related to old architecture, new one is darwin-threaded-multi-2level
    find /opt/local/lib/perl5 -type d -name darwin-2level | xargs sudo rm -fr

Ok. CPAN started to work as it can use gzip and gunzip commands. Re-installed Compress::Zlib. Then I usually install CPAN::Reporter module. It slows down installation a little bit, but it helps perl community provide you better solutions. Installation is simple:

    sh> cpan
    cpan> install CPAN::Reporter
    cpan> o conf init test_report
    cpan> o conf commit

Then I started installing Padre :)

    cpan> install Padre

It takes some time, so in another console I was looking at breaks in my perl. First of all subversion-perlbings was broken and svk didn't work. So it was easy to fix by reinstalling it using "port -f upgrade subversion-perlbindings" command. Upgraded in the same way all packages matching p5-*.

Installation of Padre failed, but it doesn't mean anything. I deleted lots of files. For example Algorithm::C3 was deleted when Class::MOP is not. It's all easy to fix. Just install modules when some tests die with "module is missing" error.

At the end I had problems with File::HomeDir. It's something that affects loading Padre. Reported a bug report and decided to stop at this point.

Some conclusions. Macports are good, but not that good. For example gentoo has perl-cleaner utility that helps fix things. revdep-rebuild is another gentoo's tool that help a lot during upgrades. At the end switching from perl without threads to version with threads support is a lot of reinstallations. I'm fine with that, but don't think a lot of people are too. I don't think that building everything from scratch for Padre is going to help its acceptance. I see more benefit from helping MacPorts and other distributions solve problems switching from not-threaded perl to threaded and back. File::HomeDir needs more love. Otherwise I had no problems, but the app is not functioning at this moment. Going to try a little some day later.


  1. Or you could have followed this guide!

    Worked well for me!

  2. I don't see those instructions cover switching perl from not-threaded to threaded.

    Also, I think that recommending force installing anything from CPAN is wrong. It hurts you at the end. You're lucky if it doesn't hurt your application, but you can get into trouble debugging problem in your app that is problem of a module that has been force installed.

    It went actually good, but I've found real problem in File::ShareDir and there is a problem with Mac::Carbon that is also known. I hope those would be fixed and Padre dev-community can make that happen.

  3. Anonymous00:05

    ok, but since you are on a MAC... what's your impression of Padre compared to others editors... maybe first of all TextMate?

  4. I'm quite happy user of vim, but want to look more at Padre and probably switch over at some point or steal some things into vim. For a long time I was not looking into any editors cuz I'm mostly happy with vim.

    I tried it once on windows. It was a bit slow, but otherwise I had thought that is gonna be the best editor for perl on windows. On Mac it's more like, you know, let's try to install it and give feedback on installation process. Installation didn't went well, but that's only partly padre's fault. I believe that Padre dev-team already fixed lots of bugs in modules they use and that's going to improve more.

    At some point I'm going to finish installation and may be fix the bug I reported. When that happens I'll write about features I like and miss.

  5. Thanks for investing time to try Padre and to write up this report. We - the Padre developers - would love to see a Mac user start to take care of the Mac related issues of Padre in order to make it easier to install and then to make it behave similar to other applications on Mac.