Re: Mason tidy
Shane McCarron <[email protected]> Fri, 14 Sep 2012 16:19:50 -0500
| Newsgroups | gmane.comp.web.mason.user |
|---|---|
| Message-ID | <CACCbJAbZLfKvgd1PxrM=KFEo+D7=e90hCPAM5twkp+PriWp6Zg@mail.gmail.com> |
On Fri, Sep 14, 2012 at 4:04 PM, Jonathan Swartz <[email protected]> wrote: > > On Sep 14, 2012, at 1:41 PM, Shane McCarron wrote: > > Also it looks like there is a Test::Class dependency that was undeclared. > > > 2.5.1 depends on Test::Class::Most, that should do it? But I've added > missing dependencies Capture::Tiny, File::Temp, and IPC::System::Simple. > Just realized that I used a broken regex when searching for modules I used. > :) > > I noticed a couple if things when I got it installed and tried to run it: > > 1. I have a (bad) habit of having %perl blocks that are not > freestanding. In otherwords, there is a perl section that has a condition > or the start of a block in it, then there is some HTML outside of a perl > block (possibly with inline Mason), then there is another perl section (or > an inline Mason) that closes the block. I understand that this is not > supported, but I am not sure how to tell Mason::Tidy to permit this (bad) > habit. > > Ahh, I see, so you'd want the <%perl> sections to combine together the way > that %-lines currently do. That's actually quite reasonable, but it wlll > take some more work! > I think basically all the perl sections should combine with all the inline sections but I can't imagine how you will do that. I do NOT think it would be necessary to support weird constructs like main component perl sections that have other sections embedded in them. For example <%perl> some perl code </%perl> some HTML other HTML % inline mason <%method something> <%perl> ..... </%perl> embedded HTML in a method % inline in a method more HTML <%perl> another block </%perl> </%method> % other inline mason back in main component <%perl> perl in main component </%perl> some embedded HTML in main component I probably do nonsense like that, but if I do I should really be moving those methods to the end of the component. > 1. When running masontidy on a sample file I get a lot of output like > "Ignoring -b; you may not specify a destination stream and -b together". > Not sure what that means, but I assume it is something from perltidy. > > No idea, did you put -b in your perltidy options list? You shouldn't need > to. > I am an idiot - I forgot there even WAS a local .perltidyrc. I haven't used perl tidy on that project in years. Thanks! > > 1. When building on a Windows machine the generated .bat file works > fine, but the generated native perl has the wrong #! line in it. Not sure > if there is a way to fix that, but if there is then it would work right > when called from a Cygwin shell on Windows (I use that for a development > environment sometimes). > > I just have #!/usr/bin/perl at the top of bin/mason, I've always thought > that was the correct thing to put. I don't have a Windows environment but > let me know if you figure out a way to fix it. > I will give it a think. -- Shane McCarron [email protected] ------------------------------------------------------------------------------ Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ Mason-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mason-users