Not a huge effort - I tried to separate the code into two main areas - dealing with Perltidy and dealing with Tk - so theoretically, it would just require poking the Tk side. That said, I've never played with Wx so the most work is in learning the Wx API.
The lib/ dir is split into the two areas - lib/TidyView and lib/PerlTidy, and almost all the Tk code is in lib/TidyView. There is some in the main .pl file, setting up frames for TidyView things to go in. I've also used only standard Tk widgets, and the only non-standard Tk code is to use a single scrollbar to control two scrolled text panes - so I'd have to also work out how to do that too. Plus add some code to detect if a user had Tk or Wx installed - and we're done!! Simple!! Gimme a few weeks. L -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, 14 September 2006 10:43 PM To: Leif Eriksen Cc: perl-qa@perl.org Subject: Re: TidyView - preview your perltidy options Please excuse the stupid question, but is there any chance this could use Wx instead of Tk, since Wx installs from CPAN cleanly everywhere now (I think) and Tk doesn't seem to install properly. But then I imagine moving to Wx would mean a HUGE amount of code to change... Adam K [EMAIL PROTECTED] wrote: > Hi all, > I have release a pet project on Sourceforge called TidyView, at > https://sourceforge.net/projects/tidyview/ > <https://sourceforge.net/projects/tidyview/> > > Basically it is a Tk GUI to help preview the effect of the > plethora of options provided by Perltidy. > > If you dont know what Perltidy is, its a pretty-printer for > Perl-code. You can use it to have all your code consistently indented > and spaced, automagically. > > Perltidy is recommended by TheDamian at page 34 of PBP, and he > provides a sample perltidy config file. But if you wish to tweak this, > it is easy to get lost in the hundreds of option choices available. > > You can preview the effect of your selected options on your code, > and if you like them, have a nicely formatted perltidyrc file saved > for you. It can also parse and present your exisiting perltidyrc > files, and allow you to make incremental adjustments to tighten up > your desired autoamtic code formatting > > Obviously it requires Tk and Perltidy, both available from CPAN. > It supports some pretty old Tk versions, but requires a very recent > Perltidy. Additionally, whilst this is in the early release phase, > version and Log::Log4perl are required. > > I have been working with the author of Perltidy over the past few > months, and he has been using TidyView to debug and improve Perltidy > itself, which is just super. > > So if you wish to have a consistent code style for all your (and > your dev teams) Perl-code, till you get it looking just right. > > Its licensed under the same terms as Perl itself, and I am very, > VERY eager to receive feedback, complaints, abuse, suggestions and > patches. There are a list of things I'd like to add in the TODO file, > colourised diff's between what you code originally looked like and how > Perltidy formatted it would be a great addition, but I haven't a clue > how to do it. > > Note, there are some people who have expressed the concern that > Perltidy can inadvertently change the parse tree of the code it > reformats - that is, change the meaning of your code. > However, the developer of Perltidy says no one has every reported that > to him in the many years he's been developing Perltidy, though he's > sure someone (TheDamian would have to be at the top of that > list) could write something sufficiently freaky to do that - but they > havent yet. But if there is enough demand for it, I can add in support > for PPI::Signature to make sure that doesnt ever happen without > TidyView noticing. I haven't done it yet as at the moment it solves a > problem that doesn't exist, and it introduces another dependency. > Patches to flexibly support PPI::Signature are welcome. > > The purpose of announcing this on PerlQA is that coding standards > are often lumped into the 'QA'-bucket, so the QA mail-list seems most > appropriate. I hope to announce this more widely (perl monks, CPAN > maybe) in a few weeks. > > Thanx for your time, > > Leif Eriksen > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.405 / Virus Database: 268.12.3/447 - Release Date: > 13/09/2006 > > > ********************************************************************** > IMPORTANT > The contents of this e-mail and its attachments are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you received this e-mail in error, please notify > the HPA Postmaster, [EMAIL PROTECTED], then delete the e-mail. > This footnote also confirms that this e-mail message has been swept > for the presence of computer viruses by Ironport. Before opening or > using any attachments, check them for viruses and defects. > Our liability is limited to resupplying any affected attachments. > HPA collects personal information to provide and market our services. > For more information about use, disclosure and access see our Privacy > Policy at www.hpa.com.au > ********************************************************************** -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.12.3/447 - Release Date: 13/09/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.12.3/447 - Release Date: 13/09/2006 ********************************************************************** IMPORTANT The contents of this e-mail and its attachments are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you received this e-mail in error, please notify the HPA Postmaster, [EMAIL PROTECTED], then delete the e-mail. This footnote also confirms that this e-mail message has been swept for the presence of computer viruses by Ironport. Before opening or using any attachments, check them for viruses and defects. Our liability is limited to resupplying any affected attachments. HPA collects personal information to provide and market our services. For more information about use, disclosure and access see our Privacy Policy at www.hpa.com.au **********************************************************************