On Sat, Dec 10, 2011 at 18:59, Thierry Vignaud <thierry.vign...@gmail.com> wrote: > On 10 December 2011 18:29, <r...@mageia.org> wrote: >> coding style update (perl_checker) > > uh? Tools.pm doesn't currently pass perl_checker
Right; but I couldn't see why that was a syntax error at that point (and the script did work). Anyway, now it looks much better (but for used modules or "not recognised yet"). > just do sg like this: > [...] > if ((@info{qw(name version release variant arch medium build > ext)}) = $name =~ > > m/^(Mageia)-(\d+)-((?:alpha|beta|RC)\d*)?(-(?:.*))?-(i586|x86_64|dual)?(?:-(CD|DVD|BD))?(?:-(build_\w+))?\.(.*)$/) > { > $info{full} = $name; > } > [...] Looks much more compact, thanks. Added a "else { %info = (); }" to satisfy the expected behaviour (empty array returned if no match). >> open(my $file, "temp_media_on_iso.log") if -r "temp_media_on_iso.log"; >> >> while ($media = <$file>) { > > just reuse cat_() from MDK::Common (simpler, easier to read) Thanks! By the way, is there a "best" Web-based doc for MDK Perl libraries? (could find one, but not at once, and I didn't count many). Or shall we think about it?