How I wrote a refactoring Perl editor in 4 hours

Alias on 2005-06-16T11:07:29

After finishing the shiny new PPI::Transform API, I figured why not convert Perl::Squish over to it, since that what inspired PPI::Transform in the first place.

So this afternoon, I decided I might have a very quick look at the PCE editor, and see what might be involved in adding PPI::Transform support to it.

The coolest thing about PCE is that it is just Perl. Not packaged into some hideous zipped/munged PAR-like thing, but completed open and raw .pm files. NEAT!

So after fiddling with it for 3 or 4 hours I can run a menu command that modifies the content of the document. :)

And another 10 lines of code makes that modification process work with any PPI::Transform-compatible class.

So now, I can do stuff like this!

Hurray!


About the editor

sigzero on 2005-06-16T15:00:09

Is that your creation as well or are you modifying another?

Re:About the editor

Alias on 2005-06-16T17:09:38

No, the PCE editor is the work of others.

But it's not what you would call a "refactoring editor". And now it is!

I call it IntelliPerl Lite :)

Did you hack the binary of PCE?

rats on 2005-06-25T07:15:32

Is the source available? There is no mention of it that I can see on www.perlvision.com/pce.

Re:Did you hack the binary of PCE?

Alias on 2005-06-26T11:54:05

There are two "PCE"s. One is an fairly simple and ugly editor written in I presume C.

The other is more accurately known as "Proton CE" for now, and will be getting a better and less confusing name.

The source, and specifically my hacks to it, are evil and unstable.

I'm hoping to having something more stable and reliable by the time OSCON rolls around. Keeps your eyes peeled for more information.