Bug 675684 - RFE: file could recognize perl header files (.ph)
Summary: RFE: file could recognize perl header files (.ph)
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: file
Version: 6.1
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Jan Kaluža
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-07 10:30 UTC by Milos Malik
Modified: 2011-03-22 10:39 UTC (History)
0 users

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-22 10:39:04 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Milos Malik 2011-02-07 10:30:53 UTC
Description of problem:


Version-Release number of selected component (if applicable):
file-5.04-6.el6

How reproducible:
always

Steps to Reproduce:
# rpm -ql perl | grep -F .ph | xargs file
/usr/lib64/perl5/_h2ph_pre.ph:               ASCII text
/usr/lib64/perl5/asm-generic/bitsperlong.ph: ASCII text
/usr/lib64/perl5/asm-generic/int-l64.ph:     ASCII text
/usr/lib64/perl5/asm-generic/int-ll64.ph:    ASCII text
/usr/lib64/perl5/asm-generic/ioctl.ph:       ASCII text
/usr/lib64/perl5/asm/auxvec.ph:              ASCII text
/usr/lib64/perl5/asm/bitsperlong.ph:         ASCII text
/usr/lib64/perl5/asm/cputable.ph:            ASCII text
/usr/lib64/perl5/asm/elf.ph:                 ASCII text, with very long lines
/usr/lib64/perl5/asm/ioctl.ph:               ASCII text
/usr/lib64/perl5/asm/ioctls.ph:              ASCII text
...

Actual results:


Expected results:

Comment 2 Jan Kaluža 2011-02-07 14:17:26 UTC
I'm not sure it will be possible to improve Perl recognition significantly, because Perl doesn't have so unique syntax in comparison with other languages.

The only thing I can probably do is to check if the file ends with "1;", because that's what usually perl headers do, but I don't believe it would be accepted by upstream.

I'll keep it open for a while and be thinking more about it.

Comment 3 Jan Kaluža 2011-03-22 10:39:04 UTC
After some discussions with people who know Perl better than me I think there's no way how to significantly improve File Perl patterns and don't break detection of other scripting languages. Closing this as WONTFIX.


Note You need to log in before you can comment on or make changes to this bug.