Hidden tricks in the Xcode editor

I’m quite fond of Xcode’s built-in editor. I have no problem with anyone trying to write the Next Great Programmer’s Editor, but the bar is pretty high. I use Xcode for almost all of my programming, including web sites and Perl.

In C, you can use the #pragma mark directive to add a comment to the function listing at the top of the window. In Perl, you can do the same with “TODO:” comments. However, I wanted to see if I could add a mark without having to use “TODO:”. I dug around and found the XcodeEdit private framework and discovered the syntax files for the Xcode editor. Here is the full list of marker codes:

  • TODO:
  • FIXME:
  • !!!:
  • ???:
  • MARK: This one is special. You don’t get the mark, just the text!

Back to work!

Custom Perl modules

I may need a Perl category here shortly.

Once again, I have had to re-find the following information about doing custom installations of CPAN modules. Here are the details…

$ PERL5LIB=$HOME/lib/perl5/5.8.7:$HOME/lib/perl5/site_perl/5.8.7

$ perl Makefile.PL PREFIX=~/lib

$ make
$ make install