Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the devel-nytprof CPAN distribution.

Report information
The Basics
Id: 99080
Status: resolved
Priority: 0/
Queue: devel-nytprof

People
Owner: Nobody in particular
Requestors: HMBRAND [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 5.06
Fixed in: (no value)



Subject: nytprofhtml --open fails on KDE
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Message-ID: <rt-4.0.18-18570-1411457482-1313.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 1655
Download (untitled) / with headers
text/plain 1.6k
"nytprofhtml --open" will fail on KDE (KDE4 with non-standard Opera), as the code is broken failure line: sh: openURL: command not found $ perl -MV=Devel::NYTProf Devel::NYTProf /pro/lib/perl5/site_perl/5.20.0/x86_64-linux-thread-multi-ld/Devel/NYTProf.pm: 5.06 This is perl 5, version 20, subversion 0 (v5.20.0) built for x86_64-linux-thread-multi-ld line 1317 and on my @try = qw(xdg-open); if ($ENV{BROWSER}) { push(@try, split(/:/, $ENV{BROWSER})); } else { push(@try, qw(firefox galeon mozilla opera netscape)); } unshift(@try, "kfmclient") if $ENV{KDE_FULL_SESSION}; unshift(@try, "gnome-open") if $ENV{GNOME_DESKTOP_SESSION_ID}; # here @try is qw( kfmclient xdg-open firefox opera ) for (grep { have_prog($_) } @try) { if ($_ eq "kfmclient") { $BROWSER .= " openURL %s"; # <= bad code } elsif ($_ eq "gnome-open" || $_ eq "opera") { $BROWSER = "$_ %s"; } else { $BROWSER = "$_ %s &"; } last; } } # here $BROWSER = " openURL %s" Obviously, the line should have been $BROWSER = "$_ openURL %s"; Which is almost never what is wanted: $ xdg-mime query filetype nytprof/index.html text/html $ xdg-mime query default text/html Opera.desktop Using KDE's "systemsettings" has Opera on top as possible webbrowsers, but kfmclient still opens with Konqueror. IMHO, "xdg-open" should always be first as it is so widely adopted now FWIW Opening index.html from dolphin will also start Opera
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-18570-1411457482-1313.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-18570-1411457482-1313.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-25001-1411458060-1618.99080-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 809
Download (untitled) / with headers
text/plain 809b
IMHO, having xdg-open first would be cleanest like this: else { my @try; if ($ENV{BROWSER}) { push(@try, split(/:/, $ENV{BROWSER})); } else { push(@try, qw(firefox galeon mozilla opera netscape)); } unshift @try, "kfmclient" if $ENV{KDE_FULL_SESSION}; unshift @try, "gnome-open" if $ENV{GNOME_DESKTOP_SESSION_ID}; unshift @try, "xdg-open"; for (grep { have_prog($_) } @try) { if ($_ eq "kfmclient") { $BROWSER = "$_ openURL %s"; } elsif ($_ eq "gnome-open" || $_ eq "opera") { $BROWSER = "$_ %s"; } else { $BROWSER = "$_ %s &"; } last; } Works fine in my environment
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-25001-1411458060-1618.99080-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-18570-1411457482-1313.0-0-0 [...] rt.cpan.org> <rt-4.0.18-25001-1411458060-1618.99080-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-9434-1412520402-1563.99080-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 45
Does installing Browser::Open fix it for you?
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-18570-1411457482-1313.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-18570-1411457482-1313.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-27194-1412520677-322.99080-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 60
Fixed in b03293f I hope (via your suggested change). Thanks.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.