Subject: | allow adding of magic lines |
Date: | 15 Jul 2007 09:40:33 +0200 |
To: | bug-File-LibMagic [...] rt.cpan.org |
From: | Cyberiade.it Anonymous Remailer <anonymous [...] remailer.cyberiade.it> |
allow adding of individual magic lines. that way if you only
want to define a few new magic identifiers, you don't have
to copy the system one and add your custom lines to it. you
can read in the system file, then add a few lines like so:
my $magic = File::LibMagic->new('/usr/share/file/magic.mime');
while (my $line = <DATA>) {
chomp $line;
$magic->add_magic($line);
}