#466 Problems with Perl::Critic's enablement

v0.6.x
closed-fixed
Editor (234)
5
2008-01-25
2008-01-12
Jan Ploski
No

The <enablement> tags specified in plugin.xml are ignored for the action in the Source menu, thus making it possible to run the PerlCriticAction without having provided a path to the perlcritic executable. In effect, the script to be checked is executed instead of perlcritic.

Discussion

  • Jan Ploski

    Jan Ploski - 2008-01-12

    Logged In: YES
    user_id=86907
    Originator: YES

    Fixed in CVS.

    After an unsuccessful attempt to control the menu action's enablement using the system property by overriding isEnabled, I decided to get rid of the optional enablement altogether. Instead:
    1. When the PerlCriticAction is run and Perl::Critic has not been enabled in Preferences, an appropriate message dialog is displayed. I think this is better than just showing the action in disabled state because it guides the user to do the right thing.
    2. PerlCriticAction will also check whether the provided path to the perlcritic script is correct (or at least whether it points to an existing file) and complain to the user if necessary.

     
  • Jan Ploski

    Jan Ploski - 2008-01-25
    • status: open --> closed-fixed
     
  • Jan Ploski

    Jan Ploski - 2008-01-25

    Logged In: YES
    user_id=86907
    Originator: YES

    Fixed in 0.6.19.

     

Log in to post a comment.