# Encoding: UTF-8

[{beforeRunningCommand: "nop",
  command: 
   "word=${TM_SELECTED_TEXT:-$TM_CURRENT_WORD}\n(perldoc -u \"$word\" 2>/dev/null || perldoc -u -f \"$word\" 2>/dev/null) | pod2html --q --title \"Perl Documentation - $word\" 2>/dev/null | sed -E 's|<a href=\"#(item_)?([^\"]+)\">|<a href=\"http://perldoc.perl.org/search.html?q=\\2\">|g'\nif [[ -e \"${TM_DIRECTORY}/pod2htmd.tmp\" ]]\n  then unlink \"${TM_DIRECTORY}/pod2htmd.tmp\"\nfi\nif [[ -e \"${TM_DIRECTORY}/pod2htmi.tmp\" ]]\n  then unlink \"${TM_DIRECTORY}/pod2htmi.tmp\"\nfi",
  fallbackInput: "word",
  input: "selection",
  keyEquivalent: "^h",
  name: "Documentation for Word / Selection",
  output: "showAsHTML",
  scope: "source.perl",
  uuid: "DA0A5D89-5F16-11D9-B9C3-000D93589AF6"},
 {beforeRunningCommand: "nop",
  bundleUUID: "4679B572-6227-11D9-BFB1-000D93589AF6",
  command: 
   ". \"$TM_SUPPORT_PATH/lib/webpreview.sh\"\nhtml_header \"Perl Bundle Help\" \"Perl\"\n\nMarkdown.pl <<'EOF'\nby Eric Hsu, Noah Daniels, Martin Vetter and Brad Choate\n\n<textmate@betterfilecabinet.com> | <http://math.sfsu.edu/hsu/textmate>\n\n## Release Notes\n\nThe package consists of a syntax highlighting file and a few handy commands:\n\n- Documentation for Word (using perldoc)\n- Perl Validate Syntax\n- Run Script\n- Send to [Affrus](http://www.latenightsw.com/affrus/) (requires Affrus, obviously)\n- Tidy (requires [PerlTidy](http://perltidy.sourceforge.net/), may need to tweak path)\n- Perl to One-liner (strips comments & extra whitespace, requires perltidy)\n- Help (show this file)\n\nRemoved\n\n- Perl Comment Toggle (removed in favor of Source / Toggle Comment)\n- List Subroutines (removed in favor of native function pop-up)\n\n\nTo Do. Fix q, qq to deal with different matched delimiters. \n\t\n- `$i++` coloring. \n- `/dsds/g < /asdfd/g` coloring.\n\n\n## History\n\n- (12-23-05)\n\t- Brad Choate fancied up Validate Syntax command.\n    - Added Run Script command.\n    - Improved documentation lookup (internal links are converted to refer to perldoc.perl.org queries)\n    - Added several snippets for various language constructs.\n\t- \"last\" colored as a control structure.\n\t\n- (12-20-04) \n    - Martin Vetter added [] and () to the Perl folding syntax.\n    - `__DATA__` now highlights to the end\n    - `q` `qq` `qw` `qx` quoting is nicer\n    - Known problems: here-docs not quoted, many autoquotes not highlighted right, e.g. hashkeys in => notation.\n    - Noah Daniels submitted bug fix to color POD starting with `^=` and not just `^=head1`\n    - Noah Daniels also submitted bug fix for `$#foo` being counted as a comment.\n\t\n- (12-8-04) \n    - recognizes more syntax (thanks to Xavier Noria for bug report)\n    - adjusted `$foo{bar}` so the first brace isn't highlighted\n    - `q` `qq` `qw` `qx` quoting recognized\n    - POD recognized (from `=head1` to `=cut`)\n    - `__END__` `__DATA__`, `__FOO__` all recognized\nadded Perl to One-liner\n\n- (11-25-04)\n    - added auto-indent\n    - added file test operator syntax highlighting\n\n- (11-5-04)\n    - added Perl Error Check, Perl Tidy, and Find Subroutines commands. \n    - you can get source for [Perl Tidy](http://perltidy.sourceforge.net/)\n\n- (10-17-04)\n    - added \"Perl Comment Toggle\"\n    - highlight text and it will toggle the comment status of the line. if there are multiple lines, if will comment or uncomment all of them depending on the first line.\n    - removed `//` as comment marker\n    - made comments slightly darker\n\n- (10-14-04)\n    - added \"Send to Affrus\" command\n    - added \"Perldoc Search\" command: highlight a word and get a window of perldoc\n    - added .pm to recognized filetypes.\n\n- (0.2)\n    - Just a quick hack\n    - based on PHP S.D. by (Justin French, Sune Foldager, Allan Odgaard)\n    - Doesn't recognize all special variables, just `$1`, `...`, `$9` and `$_`, `@_`.  \n\nEOF\n\nhtml_footer",
  input: "none",
  name: "Help",
  output: "showAsHTML",
  scope: "source.perl",
  uuid: "EC48C79A-82AA-11D9-8753-000D9332809C"},
 {beforeRunningCommand: "nop",
  captureFormatString: "$1 $3",
  capturePattern: "^(.*)line (\\d+)(.*)$",
  command: 
   "require_cmd perltidy 'Perltidy is available <a href=\"javascript:TextMate.system(&quot;open http://perltidy.sourceforge.net/&quot;, null)\">from here</a>.'\n\nperltidy -st -dac -mangle | perl -e '        local $/;$_=<>;s/^#(.*?)\\n//;s/\\n//g;print;'\n",
  input: "selection",
  lineCaptureRegister: "2",
  name: "Perl to One-line",
  output: "replaceSelectedText",
  scope: "source.perl",
  uuid: "DA0A6096-5F16-11D9-B9C3-000D93589AF6"},
 {beforeRunningCommand: "nop",
  command: 
   "#!/usr/bin/env ruby\n\nrequire \"\#{ENV[\"TM_SUPPORT_PATH\"]}/lib/tm/executor\"\nrequire \"\#{ENV[\"TM_SUPPORT_PATH\"]}/lib/tm/save_current_document\"\n\nTextMate.save_current_document\nTextMate::Executor.make_project_master_current_document\n\nTextMate::Executor.run(ENV[\"TM_PERL\"] || \"perl\", \"-I\#{ENV[\"TM_BUNDLE_SUPPORT\"]}\",\n     \"-Mexception_handler\", ENV[\"TM_FILEPATH\"], :version_args => [\"-e\", 'printf \"Perl v%vd\", $^V;'])\n",
  input: "document",
  keyEquivalent: "@r",
  name: "Run Script",
  output: "showAsHTML",
  scope: "source.perl",
  uuid: "2F3DB2EF-6B9E-4E5F-87A8-3675680E5C0D"},
 {beforeRunningCommand: "saveActiveFile",
  command: "open -a Affrus \"$TM_FILEPATH\"",
  input: "none",
  keyEquivalent: "^@p",
  name: "Send to Affrus",
  output: "discard",
  scope: "source.perl",
  uuid: "DA0A5E1E-5F16-11D9-B9C3-000D93589AF6"},
 {beforeRunningCommand: "nop",
  command: 
   "require_cmd perltidy 'Perltidy is available <a href=\"javascript:TextMate.system(&quot;open http://perltidy.sourceforge.net/&quot;, null)\">from here</a>.'\n\nperltidy -st -q\n",
  input: "selection",
  keyEquivalent: "^H",
  name: "Tidy",
  output: "replaceSelectedText",
  scope: "source.perl",
  uuid: "DA0A5F4B-5F16-11D9-B9C3-000D93589AF6"},
 {beforeRunningCommand: "saveActiveFile",
  captureFormatString: "$1 $3",
  capturePattern: "^(.*)line (\\d+)(.*)$",
  command: 
   ". \"${TM_SUPPORT_PATH}/lib/html.sh\"\ncd \"${TM_DIRECTORY}\"\nout=`\"${TM_BUNDLE_SUPPORT}/perlcheckmate.pl\" \"${TM_FILEPATH}\"`\nif [[ $out ]]\n  then htmlHeader \"Perl syntax errors for ${TM_FILENAME}\";\n       exit_show_html \"$out\";\n       htmlFooter\n  else exit_show_tool_tip \"No errors!\"\nfi",
  input: "document",
  keyEquivalent: "^V",
  lineCaptureRegister: "2",
  name: "Validate Syntax",
  output: "discard",
  scope: "source.perl",
  uuid: "DA0A5FEC-5F16-11D9-B9C3-000D93589AF6"},
 {beforeRunningCommand: "nop",
  command: "pod2html 2>/dev/null",
  input: "document",
  keyEquivalent: "^@p",
  name: "View POD as HTML",
  output: "showAsHTML",
  scope: "source.perl",
  uuid: "CF2CA4F9-82A7-11D9-8753-000D9332809C"}]
