[Bug 924938] wrong provides in latest build

bugzilla at redhat.com bugzilla at redhat.com
Mon Mar 25 09:16:05 UTC 2013


Product: Fedora
https://bugzilla.redhat.com/show_bug.cgi?id=924938

--- Comment #24 from Jan Kaluža <jkaluza at redhat.com> ---
It's still the same problem. File output is unreliable and I think it should
not be used for use-cases where you really want to be sure. It will always
detects some non-perl files as perl files and some perl files as non-perl
files. For example, if you have Perl code in comment in C++ code, it will
detect it as Perl. 

Currently Perl is detected using following two patterns:
https://github.com/glensc/file/blob/master/magic/Magdir/perl#L29 . I don't know
Perl so well to be able to write some regexp to detect typical Perl constructs
which are not used by another languages.

If you think you know how to significantly improve Perl detection while not
breaking detection of other formants using what "man magic" provides, feel free
to open bug with patch.

What I could do is to increase the strength of "shebang" patterns, so it would
detect "/usr/bin/automake" as "Perl script" again. The question is, what is the
difference between Perl Module and Perl Script except the possible extension?
Can Perl file with shebang contain Perl Module? If yes, we should detect it as
Perl Module if there's "package", otherwise we will not set Provides right
again.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=Knoebms99i&a=cc_unsubscribe


More information about the perl-devel mailing list