[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [OSSTest Nested v12 01/21] Optimize and re-format previous code of 'submenu' parsing



On Thu, 2015-09-10 at 17:16 +0100, Ian Jackson wrote:
> Robert Ho writes ("[OSSTest Nested v12 01/21] Optimize and re-format
> previous code of 'submenu' parsing"):
> > * space between ')' and '{'; and after '='
> > * omit unnecessary 'define' and '!defined' usage
> > * break long '{}' into several lines
> 
> These changes are all good.
> 
> But            }
> 
> >              if (m/^\s*submenu\s+[\'\"](.*)[\'\"].*\{\s*$/) {
> > -                $submenu={ StartLine =>$., MenuEntryPath => join
> ">", @offsets };
> > +                $submenu= { StartLine =>$. };
> 
> This drops the setting of MenuEntryPath from $submenu.  This isn't
> mentioned in the commit message, and (without looking at the code to
> double-check) I'm not sure that it's right.

From memory MenuEntryPath is unused, but I left it there because when
debugging it was very convenient to use Data::Dumper to dump $submenu
and/or $entry at each iteration and in that case having that
information to hand can be useful.

I suppose one could argue that when debugging you can add this field
back, but personally I'd prefer to just leave it as it's harmless.

Ian.

> 
> Thanks,
> Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.