Yesterday evening I felt like it was time for something new, and I decided to install Strawberry Perl and Padre. So I grabbed the MSI installer file from Strawberry Perl's website, and ran it. Soon enough it finished, and I felt simply lost. Was that it?
I glanced in the Start Menu, and I found a few links to docs, 2 to CPAN, and one to the help channel on IRC. I've never used IRC in my life, I don't even have IRC software, so that didn't feel welcoming. No welcome message, no introduction message "What now?", nothing. I'm an experienced Perl user, and as I felt lost, I can't imagine what kind of hell it must feel like to people who are new to Perl.
So I opened a command line window, and I typed "
perl -v". Wow! At least that was something: apparently Strawberry Perl had put itself in my
PATH, and in front of my default Perl install. (The reason for that is because my default perl is in the user environment variable PATH, and Strawberry put itself in the system environment variable PATH, and the latter comes in front of the former. It doesn't feel right to me, but at least, it's a annoyance caused by Windows.)
But I had, half and half, expected that Padre would have been there. It wasn't. So I went to the win32 Wiki (following the link in the Start Menu and initially ending up in the wrong place), and tried to find a "What now?" page. Still nothing. There's a (very incomplete) page on editors usable for Perl (I can name, off the top of my head, 3 free Windows text editors that aren't listed). I needed an editor, this is a fresh Windows install and there's no editor there yet apart from Notepad.
I decided to grab Padre anyway. So I dropped down to the command line window, and typed "
CPAN", followed by "
install Padre". That should go swiftly, shouldn't it? It didn't. I got all sorts of weird errors, most of them relating to "missing prerequisite", at least most due to a module that failed to install, due to a "missing file" error message. Say what??
So I decided to figure out which module failed to install, and installed, by hand, the first one that produced such an error: IPC::Run. Hmm, that installed without glitch. But "
install Padre" still doesn't work. So, digging down, I decided to try "
install Wx" first. Big mistake. After a very long compilation time, Wx appears to exist out of trillions of little C files, it still failed to install successfully. Again, it appears the reason is because of prerequisites that failed to install.
So what was the culprit? Nothing. They all installed. But I get the distinct impression CPAN throws away part of the build before it even finishes, and therefore, installing huge dependency trees fails. You have to split it up in smaller chunks and install them one at a time.
Seriously, I can't expect somebody new to perl and CPAN to get this far. From installing Strawberry Perl to finishing installing Padre through CPAN took over 2 hours.
So after everything installed fine, I sighed a sigh of relief, and typed "padre" at the command line. A spinning cursor for 1 second, and the command line prompt was back. That was it. No error, no error message. Nothing.
After a pause of more than an hour, I decided to tackle the problem, and started by the most likely culprit: Wx, which I had more or less forced to install. I dropped back to the CPAN command line and entered "
test Wx". Again, some mysterious error message about a missing file (something like "can't copy file
look Wx", in order to unpack the distro, died with the same error. After trying a few times, it finally worked, as it seems CPAN had decided to start afresh. This reinforces the idea that CPAN is the culprit, apparently cleaning up before it even completes building. Eventually, after going through "
perl Makefile.PL" and "
dmake" manually, "
dmake test"... succeeded? So, back in the CPAN shell, I installed it again. I dropped out of CPAN, hopefully typed "
padre" and... still nothing.
So I tried one more module: Wx::Demo. (Seriously, guys, the docs of that demo module are seriously lacking. You run the demo through the script it installs: wxperl_demo.pl, but I really had to browse the repository to figure that out.) Anyway: the demos all worked. (One demo looks like shit: "WxComboCtrl", but that's a problem for another day.)
Back to "
padre": still nothing. Okay, debugging time. "
perl -x -S padre.bat". Huh, I get an editor window?? "
padre"... It works??
It no longer fails. It all works.
Okay, the nightmare is over. It took me nearly 3 hours to get this far. This is not something you want to make everybody go through. And the fault is, most likely, in the module CPAN.