jump to navigation

Build the Padre development tree using local::lib on Debian/Ubuntu February 17, 2015

Posted by claudio in Uncategorized.
Tags: , , ,
1 comment so far

catThanks to the great job of Kaare Rasmussen (kaare) and Kevin Dawson (bowtie) moving the Padre repository from a stalled svn/trac setup to github (and keeping the repo alive), hopefully the development can be rebooted.

I posted a small howto about setting and development environment to hack on Padre (svn), but it’s already outdated due to the new libraries that Linux distros now package (gtk3, wx 3.0.1, etc.). The fastest way I found to setup a Padre environment is using local::lib (https://metacpan.org/pod/local::lib).

Because recent Linux distributions have recent Perl and Padre packages, you won’t be working with ancient packages. E.g., Ubuntu 14.10 comes with Perl 5.20.1 and Padre 1.0 (this is also valid for Debian Testing/Unstable). Kudos to the Debian Perl Group (https://pkg-perl.alioth.debian.org/).

These instructions are provided for building an development environment to hack on Padre itself or to keep track of the most recent changes on github.

These are the step to get Padre fromgithub:

  • Get the OS dependencies. The easieast way is just to install the packaged padre. Its dependencies include local::lib:
    $ sudo apt-get install padre

The OS-packaged Padre can of course be starting by just typing:

$ padre

  • Get development dependencies for Padre:
    $ cpanm -l ~/perl5 Module::Install
  • Install Padre and dependencies:
    $ cpanm -l ~/perl5 .
  • Run Padre:
    – in dev mode:
    $ ./dev
    – or the local::lib installed app:
    $ ~/perl5/bin/padre

Migrate a virtualbox VM to a bigger virtual disk March 18, 2012

Posted by claudio in Uncategorized.
Tags: , , , ,

When a virtual machine has limited use, you don’t want to loose too much space. Sometimes, however, you get the size wrong.

In my case, I have a minimal Windows VM on my Ubuntu laptop. Once in a while I test an upcoming Padre (The Perl IDE) release or update a crappy usb device with Windows-only support. Win-modems may be gone, but we still have GPS devices that run GNU/Linux but can only be connected to Windows. (I guess seeing your market-share shrink because of smart-phones is what they call bad karma, TomTom.)

Windows being Windows, adding disks is a terrible experience (what’s up with the alphabet as a mounting point?) and moving a Windows installation to a second disk is a nightmare. Luckily, free software gets the job done:

1. Make sure your guest machine is halted properly. This is specially important for a NTFS (virtual) partition of a Windows VM.

2. Download Ubuntu (It does not matter if you use the 32- or the 64-bit version, other GNU/Linux distribution will work as well). The screenshots are from a Ubuntu 11.10 setup.

3. In the specific VM-settings, add a new disk (to the same disk controller) and a new cdrom. Load the Ubuntu iso in the virtual cdrom drive.


4. Make sure the VM boots from the cdrom.


5. “Try” Ubuntu. Once Ubuntu is loaded, launch “gparted”.


6. Select the old disk (normally the first one, check the size).


7. Right on the disk representation and “copy” it.


8. Select the new disk from the combo-box on the upper right (check the size).

9. Go to “Device”, choose “Create Partition Table…”. Click “Apply” in the pop-up window.


10. Right on the disk representation and “paste” the original disk. Click “Apply” in the pop-up window.

11. Click on the green “Apply tick” on the icon menu to apply the changes. This will take some time. Get some coffee.


12. Right on the disk representation and select “Manage Flags”. Enable “boot”.

13. Shut down the Ubuntu Live cd.


14. Remove the original disk from the VM configuration (back it up first).


That’s it!

Perl@FOSDEM and some photographic impressions February 8, 2011

Posted by claudio in Uncategorized.
Tags: , , , , , , , ,

All right. FOSDEM was –as always– great. 4 to 5000 Free and Open Source people on the same event has to rock. While I attended many talks about different technologies (Devops aka “System Engineering meets development”, Monitoring, Go Programming language, …), I focussed mainly on the Perl activities (pun intended).

Following Gabor’s initiative (this guy runs on Duracell batteries), last year (2010) we set up the first FOSDEM Perl booth: one table, some volunteers, many visitors and great reactions. This year (2011) everything was even better. We had a big booth at the main hall, attributes (a giant Camel (!) and probably the biggest Perl book collection in the world (!)), books to sell, a packed developer’s room on Sunday, a Perl dinner and many volunteers. There were at any time several people at the booth and sometimes even too many:). With so many volunteers it was possible to attend whatever session you wanted and also participate on the Perl developers’ room.

Here follow some pictures I took with some comments:

David Leadbeater’s Tracing Perl with DTrace/SystemTap

Liz and Wendy were to crazy nice enough to bring their giant camel and the biggest Perl book collection in the world. Both attributed really attracted visitors.

We had several books to sell… but not enough. We were sold out of chromatic’s Modern Perl halfway the first day (20 books!) and dams’s Perl Moderne (not the same book) was almost sold out as well!

Wendy and dams (from Dancer and “Perl Moderne” fame).

Although we didn’t have Automating System Administration with Perl at the booth, several people passed and showed us proudly their copy bought at the O’Reilly stand.

Spot the Perl hacker…

The main booth hall.

Those guys had something to celebrate: a new Debian stable was born.

Our perl-friendly neighbours…

We had several self-confessed Perl people: everyone like camels:)

No pun intended (the text reads “Whinging Bastard”,
DevOps? – More than Marketing by James Turnbull) :) .

Spike Morelli’s I’m Going M.A.D..

We had 13 people attending the Perl dinner! From left to right: Zeno, Bart, Gabor, Liz, Wendy, Dirk and Balint (the rest arrived later).

Mark Overmeers’s Perl data structures.

David Leadbeater’s Tracing Perl with DTrace/SystemTap: very interesting for a Solaris guy like me.

Introduction to writing readable and maintainable Perl by Alex Balhatchet.

Padre hackers Zeno and Gabor (Padre, the Perl IDE).

Paulo Castro (Packaging Perl and it’s deps…) took us to the Dark Side…

The image integration facilities of WordPress.com are pretty poor. If it wasn’t for some command line Perl foo, I would have given up posting this message. There is no way I would have gone through if I had to click 10 times for each picture…

Build Padre svn easily with perlbrew and cpanm December 10, 2010

Posted by claudio in Uncategorized.
Tags: , , , , , ,

Update: February 17, 2015: This instructions are outdated. Please have a look at https://nxadm.wordpress.com/2015/02/17/build-the-padre-development-tree-using-locallib-on-debianubuntu/

Update: January 7, 2014

Because of the fast pace of the development of Padre, the/a Perl IDE, it’s may be nice to run a bleeding edge version. Or even better, as Padre itself is written in Perl, you may like to have a look at the sources and maybe contribute some code or help with the translations.

Follow this howto to build the latest Padre from source with perlbrew and cpanm. This way, you’ll get started in no time and you won’t even touch your system Perl installation (cleanup is just a “rm -rf” away…).

1. Install perlbrew and cpanm. You can follow my howtos here: perlbrew (important: compile perl with thread support!), cpanm.

2. Install subversion (to check out the code), the compilations utils (gcc, g++, make) and the gtk2 header files. On Debian/Ubuntu:
$ sudo apt-get install subversion build-essential libgtk2.0-dev libghc-readline-dev

An interesting -but not required- shortcut is to install the Padre release in your distribution to get binary dependencies: $ sudo apt-get install padre

3. Checkout Padre from svn (I chose to install the sources under ~/Code/Padre, adapt accordingly to your standards):
$ mkdir -p ~/Code/Padre && cd ~/Code/Padre
$ svn co http://svn.perlide.org/padre/trunk

4. Install the modules that Padre needs before building the IDE.
$ cpanm Parse::Yapp Module::Install Locale::Msgfmt Alien::wxWidgets
[... lots of output ...]

$ cpanm Wx --force
[... lots of output ...]

(Wx seems to have a circular test. Force the install in the meantime.)

5. Build Padre.
$ cd ~/Code/Padre/trunk/Padre

Install the dependencies (thx to Perigrin for the simplified method):
$ cpanm --installdeps .
[... lots of output ...]

$ perl Makefile.PL
[... some output ...]

As said, development is happening fast on Padre and new releases of (external) CPAN modules are required often (some even updated by the authors in order to provide the functionality Padre needs). If a new version of a module is needed that is not yet on your cpan mirror, run cpanm (–mirror) again with a more up-to-date mirror. Run “perl Makefile.PL” again afterwards.
$ make
[... lots of output ...]

$ make test
[... lots of output ...]

6. Install padre (in the active perlbrew dependant directory) or just run the development version without installing it (including all changes to the code even after installation):
$ make install
[... lots of output ...]

$ ./dev.pl -a

Here it is:

EDIT: ZenoG’s article is a good followup post giving an step-by-step description of bug fixing is Padre.

Fosdem 2010 Impressions February 19, 2010

Posted by claudio in Uncategorized.
Tags: , , ,

This year’s FOSDEM was great. Not only did we have a Perl stand, but we could also meet face to face with other Padre developers. Here follow some loose impressions of the weekend…

Hall of Distributions

Hacker Room

Open Solaris

Erik @ the Perl Stand (with a "tuit")

Perl/Padre developers Dave and Gabor

Catalan Perl Monger Alex (I forgot the name, please forgive me...)


FSF Europe: respect!


Gabor's CPAN talk

Salve's talk on Kaizendo.org

The Hat

Some ideas on method auto-completion in Padre June 9, 2009

Posted by claudio in Uncategorized.
Tags: , , , , , ,

perlAuto-completion is a nice feature for an IDE. While Padre supports some auto-completion functions, method auto-completion is an important missing feature. This post is a short round-up of features present in other IDEs.

What auto-completion features does Padre support today?

Beside automatic bracket completion, Padre has a nice auto-completion implementation for variables (first character -including sigil- then ctrl + p):


Eclipse + Epic

Epic (an add-on to Eclipse) has a nice working auto-completion feature activated by the method invocator (->).


As a reference, the java auto-completion in Eclipse:


Komodo Edit

Komodo Edit also has auto-completion for methods, but does not show those inherited from parent classes making the feature rather useless for OO development.



Netbeans has no Perl support, nevertheless the java auto-completion feature is a good example:


The method auto-completion feature is activated by the “.” (“->” in Perl). Not only you get a list of accessible methods (with expected parameter type and return value), but also the javadoc documentation for the selected method.

How should Padre support method auto-completion? Some ideas

  1. Method autocomplete should be activated by “->” and “::”. This way class hierarchies can be autocompleted as well. With “::” support for functions can be added.
  2. Private methods should be hidden. By convention, private methods start with “_”.
  3. Linking method autocomplete to perldoc is a winner combination when programming to not yet familiar APIs and certainly friendly to new Perl developers. While Perl is not strictly typed, a well formatted perldoc entry for a method should make clear what kind of parameters are expected and what the return value could be. However, documentation is rather freely formatted, so it would be difficult to implement in a generic way (without adding formatting restriction to classes).

Perl’s new wave February 16, 2009

Posted by claudio in Uncategorized.
Tags: , , ,

perlWe all remember the “Perl is dead” hype from not so long ago. In short: Perl 6 wasn’t there yet and perl ironically wasn’t a copy of the language of the day (python, ruby, c#, …).

I was positively surprised by the response of the perl community. It wasn’t the typical “our programs run fast” (to ruby fanboys*) or “space as syntax wtf?” (to python fanboys). Instead it seemed that community took notice of the criticisms and made pretty clear that waiting for Perl 6 was not an option. Today, Perl 6 is doing fine (you can write code in Perl 6) and so is Perl 5.

So what did the community do? Well, Perl Best Practices -and corresponding module Perl::Critic– was a milestone telling people to stop writing perl 4 scripts and respect sane best practices to achieve clean and elegant code. Next to the many great modules already at CPAN (DBI::*, POE::*, DateTime, DBIx::Class (after PBP), WWW::*, etc), the community decided to address some clear shortcomings.

Moose (inspired by Perl 6) was an answer to one of the -in my opnion- greatest shortcoming of Perl 5: the basic OO framework. Perl-based Catalyst jumped on the Ruby-On-Rail wagon. chromatic, a core developer and important community member, started to think out loud what actually “modern perl” means and how we can improve perl by getting rid of obsolete features and bad practices.

An other missing piece, was a beginners-friendly and perl-centric IDE. Padre is aiming to fill this need. Gabor Szabo was able to quickly form a community developing padre (including Alias of Strawberry Perl and PPI fame). I guess this was the kind of project I was waiting for.

I hope that by being part of this project I can contribute to this positive perl new wave.

* fanboy != user


Get every new post delivered to your Inbox.

Join 197 other followers