[TxMt] TextMate perl bundle issues

Tim Diggins tim at red56.co.uk
Tue Aug 31 17:43:19 UTC 2010

Hi there -

just in case anyone else runs into the following issues when using TextMate's Perl bundle and trying to run scripts:

1) TextMate has its own PATH variable (in the settings)... It's obvious but, make sure that the perl you are using is on that path (TM doesn't pick up the path in your env).

2) there is a problem with tainting in the file - to get round this (if you are using the -T in your shebang line for example)
change line 17 of  exception_handler.pm in bundles/Perl.tmbundle/Support/exception_handler.pm to:
    $ENV{"TM_ERROR_FD"} =~ /([0-9]+)/; my $error_fd =$1; 
This will ensure that $error_fd is untainted. 

3) You may find the following error, if a module you are using uses Carp, e.g. you are using use strict (or just use strict 'vars') and you have an error in the file:
Attempt to reload Carp/Heavy.pm aborted.
Compilation failed in require at /Applications/TextMate.app/Contents/SharedSupport/Bundles/Perl.tmbundle/Support/exception_handler.pm line 30.
If you do, make sure you add a use Carp::Heavy; in the script you are running. I think this is due to clearing up a circular import that would happen otherwise (because of some cleverness  in exception_handler.pm) 

If anyone can clarify any of this, great.

all the best


Tim Diggins

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20100831/fcbc25f6/attachment.html>

More information about the textmate mailing list