Ticket #776 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

PerlTidy needs -nse and -nst options

Reported by: misterwhipple Owned by:
Priority: minor Milestone:
Component: Perl Tidy Version: trunk
Keywords: tidy perltidy plugin Cc:

Description

Summary: If a user's .perltidyrc contains either the -se or -st options (or just the -pbp option, which implies the other two), this causes Padre::Plugin::PerlTidy? to issue an error.

Steps To Duplicate:

  1. Add the -st option to .perltidyrc.
  2. With a Perl file open in Padre, select Plugins->PerlTidy?->"Tidy the Active Document" on the Padre menu.

Symptoms: A popup dialog has the title "PerlTidy? Error" and the text "You may not specify a destination array and -st together".

Workaround: Don't add -se or -st to .perltidyrc. If you add -pbp, also add -nst and -nse.

Fix: In Padre::Plugin::PerlTidy?.pm, add the options -nst and -nse were Perl::Tidy::perltidy() is called (in the _tidy and _export subs). A patch against trunk 9372 is attached.

Attachments

Padre-PerlTidy-nsenst.patch (722 bytes) - added by misterwhipple 4 years ago.
Immunize Padre::Plugin::PerlTidy? against -st option in .perltidyrc
Padre-PerlTidy-nsenst-2.patch (731 bytes) - added by misterwhipple 4 years ago.
Corrects the conflict created by my uploading a patch with an error.

Change History

Changed 4 years ago by misterwhipple

Immunize Padre::Plugin::PerlTidy? against -st option in .perltidyrc

Changed 4 years ago by misterwhipple

Corrects the conflict created by my uploading a patch with an error.

comment:1 Changed 4 years ago by misterwhipple

My first patch had an error, and it got committed before I uploaded the correction. I'll upload another patch, against trunk 9374, to resolve.

comment:2 Changed 4 years ago by misterwhipple

  • Status changed from new to closed
  • Resolution set to fixed

comment:3 Changed 3 years ago by szabgab

  • Component changed from plugins to Perl Tidy
Note: See TracTickets for help on using tickets.