aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-02-21 14:23:08 +0000
committerThierry Vignaud <tv@mandriva.org>2008-02-21 14:23:08 +0000
commit66cbb0c718faeded8d73598e4bccc517e1859552 (patch)
tree4022097766c9283d856dec2159a1460546f495be /Rpmdrake
parentc9ccd6ae176d97095e5c5ebf832cccc4d4ac2030 (diff)
downloadrpmdrake-66cbb0c718faeded8d73598e4bccc517e1859552.tar
rpmdrake-66cbb0c718faeded8d73598e4bccc517e1859552.tar.gz
rpmdrake-66cbb0c718faeded8d73598e4bccc517e1859552.tar.bz2
rpmdrake-66cbb0c718faeded8d73598e4bccc517e1859552.tar.xz
rpmdrake-66cbb0c718faeded8d73598e4bccc517e1859552.zip
(inspect) lazy load File::MimeInfo::Magic & kill a perl_checker warning
Diffstat (limited to 'Rpmdrake')
-rw-r--r--Rpmdrake/rpmnew.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/Rpmdrake/rpmnew.pm b/Rpmdrake/rpmnew.pm
index 37fb9dc0..2e0d1971 100644
--- a/Rpmdrake/rpmnew.pm
+++ b/Rpmdrake/rpmnew.pm
@@ -31,7 +31,6 @@ use Rpmdrake::init;
use Rpmdrake::pkg;
use Rpmdrake::open_db;
use Rpmdrake::formatting;
-use File::MimeInfo::Magic;
use mygtk2 qw(gtknew); #- do not import anything else, especially gtkadd() which conflicts with ugtk2 one
use ugtk2 qw(:all);
use Exporter;
@@ -132,7 +131,8 @@ sub inspect {
my %files = (file => $file, rpmnew => $rpmnew);
foreach (keys %files) {
gtktext_insert($texts{$_}, [ [ scalar(cat_($files{$_})), { 'font' => 'monospace' } ] ]);
- my $mime_type = mimetype($files{$_});
+ require File::MimeInfo::Magic;
+ my $mime_type = File::MimeInfo::Magic::mimetype($files{$_});
next if !$mime_type;
my $lang = $lang_manager->get_language_from_mime_type($mime_type);
my $buffer = $texts{$_}->get_buffer;