Perl Support Problem

Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.

  1. #1

    Default Perl Support Problem

    I am using the perl support extension by Chris Bank, to enable code colouring
    for my .pl & .cgi files.

    However I'm having problems with the start and end of strings. It uses the
    single & double quotes as delimiters for the start and end of strings, and
    anything in between is coloured red.

    Problem is, everytime I have something like this: [h]$kk13 =~ s/\'//g ;[/h] it
    assumes you're opening a string and all subsequent code is coloured red.

    Does anyone know a way around this? It may be an odd question but its quite
    major for me as I edit a lot of old perl code.

    Many thanks.

    Chris Pickle Guest

  2. Similar Questions and Discussions

    1. Problem: This file may contain newer information than this viewer can support.
      Hi All, I am using an VC++ application which uses a plugin built in VC++ for opening pdf files. whenever I open a file created in latter of...
    2. No queue support with the Sleepycat::Db Perl interface?
      I've been unsuccessful in trying to use the queue table type with the Sleepycat::Db interface and I cannot figure out why. === use...
    3. Import Sequence problem <<<<<TRY @, any MM support here?>>>>>>
      Still have this incredibly annoying problem. Director MX, XP, Ram=2 mb, new P4 etc... I CAN drag the images from a desktop folder into the Cast...
    4. NFS3 support in Debian - file size problem
      In article <20030714214311.O3469@msi.unilim.fr>, Hubert Mercier - Laboratoire MSI <mercier@msi.unilim.fr> wrote: Why not? You're not telling us...
    5. Problem with Design Support in VS.NET 2002 (but not 2003?)
      Hi Paul, Could you post some code? -- Victor Garcia Aprea Microsoft MVP | ASP.NET Looking for insights on ASP.NET? Read my blog:...
  3. #2

    Default Re: Perl Support Problem

    Chris,

    I don't have that extension installed at the moment, but it looks like
    the regular expression settings are either missing or incorrect. If it's
    missing try adding this (blatantly copied from the JavaScript code
    coloring settings :)

    <regexp name="RegExp" id="CodeColor_PerlRegexp" delimiter="/" escape="\\">
    <searchPattern><![CDATA[(\s*/\e*\\/]]></searchPattern>
    <searchPattern><![CDATA[=\s*/\e*\\/]]></searchPattern>
    </regexp>

    Let me know you results so I can pass them on to Chris.

    HTH,
    Randy

    > I am using the perl support extension by Chris Bank, to enable code colouring
    > for my .pl & .cgi files.
    >
    > However I'm having problems with the start and end of strings. It uses the
    > single & double quotes as delimiters for the start and end of strings, and
    > anything in between is coloured red.
    >
    > Problem is, everytime I have something like this: [h]$kk13 =~ s/\'//g ;[/h] it
    > assumes you're opening a string and all subsequent code is coloured red.
    >
    > Does anyone know a way around this? It may be an odd question but its quite
    > major for me as I edit a lot of old perl code.
    Randy Edmunds Guest

  4. #3

    Default Re: Perl Support Problem

    Well I've checked the xml file and it does contain regular expression settings:

    <regexp name="RegExp" id="CodeColor_perlre" delimiter="/" escape="\\">
    <searchPattern><![CDATA[(\s*/\e*\\/]]></searchPattern>
    <searchPattern><![CDATA[=\s*/\e*\\/]]></searchPattern>
    <searchPattern><![CDATA[=~|!\s*/\e*\\/]]></searchPattern>
    </regexp>

    and I did try the one you posted also, except I changed the id of it to mine.
    No luck there either.

    Its because the colour xml thinks the string is still open isn't it? If you
    know Chris and could pass the message on I'd very much appreciate that.

    Thanks very much

    Chris A.

    Chris Pickle Guest

  5. #4

    Default Re: Perl Support Problem

    Try adding these lines of code to that code coloring file. If they fix the bug
    I'll post an update to the exchange. How is the rest of the extension working
    out for you. The exchange doesn't have a good feedback mechanism so it's hard
    to tell what people think other than the number of downloads.

    Thanks,
    Chris
    Adobe Dreamweaver Engineering



    <regexp name="RegExp" id="CodeColor_perlre" delimiter="/" escape="\\">
    <searchPattern><![CDATA[(\s*/\e*\\/]]></searchPattern>
    <searchPattern><![CDATA[=\s*/\e*\\/]]></searchPattern>
    <searchPattern><![CDATA[=~\s*/\e*\\/]]></searchPattern>
    <searchPattern><![CDATA[=~\s*s/\e*\\/]]></searchPattern>
    <searchPattern><![CDATA[=~|!\s*/\e*\\/]]></searchPattern>
    </regexp>

    ChrisBank Guest

  6. #5

    Default Re: Perl Support Problem

    Try adding these lines of code to that code coloring file. If they fix the bug
    I'll post an update to the exchange. How is the rest of the extension working
    out for you. The exchange doesn't have a good feedback mechanism so it's hard
    to tell what people think other than the number of downloads.

    Thanks,
    Chris
    Adobe Dreamweaver Engineering



    <regexp name="RegExp" id="CodeColor_perlre" delimiter="/" escape="\\">
    <searchPattern><![CDATA[(\s*/\e*\\/]]></searchPattern>
    <searchPattern><![CDATA[=\s*/\e*\\/]]></searchPattern>
    <searchPattern><![CDATA[=~\s*/\e*\\/]]></searchPattern>
    <searchPattern><![CDATA[=~\s*s/\e*\\/]]></searchPattern>
    <searchPattern><![CDATA[=~|!\s*/\e*\\/]]></searchPattern>
    </regexp>

    ChrisBank Guest

  7. #6

    Default Re: Perl Support Problem

    Yes Chris, thats done the trick! Thanks very much. Also, could you tell me how
    to make this codecoloring work for .cgi files too? The syntax is identical, but
    at present they only color .pl files.

    Many thanks

    Chris

    Chris Pickle Guest

  8. #7

    Default Re: Perl Support Problem

    Chris,

    This TechNote explains it:

    [url]http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16410[/url]

    You'll need to add "cgi" to the list of fileextensions where "pl" is
    specified.

    Randy

    > how to make this codecoloring work for .cgi files too? The
    > syntax is identical, but at present they only color .pl files.
    Randy Edmunds Guest

  9. #8

    Default Re: Perl Support Problem

    many thanks Chris & Randy for your time spent helping me out with this one. I can now finally uninstall Homesite and use Dreamweaver as a total solution to all my development needs.

    All the best!
    pickledegg Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139