Hi, I've written a patch for mytop version 1.9 mentioned here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=590505
This patch replaces the CPAN Config::IniFiles with Config::GitLike. If you like you can adapt it easily for version 1.6 by changing the lines. Am 19.05.2011 13:51, schrieb Debian Bug Tracking System: > Thank you for filing a new Bug report with Debian. > > This is an automatically generated reply to let you know your message > has been received. > > Your message is being forwarded to the package maintainers and other > interested parties for their attention; they will reply in due course. > > Your message has been sent to the package maintainer(s): > Philipp Matthias Hahn <[email protected]> > > If you wish to submit further information on this problem, please > send it to [email protected]. > > Please do not send mail to [email protected] unless you wish > to report a problem with the Bug-tracking system. > -- Andreas Ulm Systemadministration Unister GmbH Barfußgässchen 11 | 04109 Leipzig Telefon: +49 (0)341 49288 4535 [email protected] www.unister.de Vertretungsberechtigter Geschäftsführer: Thomas Wagner Amtsgericht Leipzig, HRB: 19056
1a2,4
>
> eval 'exec /usr/bin/perl -w -S $0 ${1+"$@"}'
> if 0; # not running under some shell
19a23
> use Config::GitLike;
112a117,149
>
> ## Try ~/.my.cnf first
>
> my $mycnf = "$ENV{HOME}/.my.cnf";
>
> if (-e $mycnf)
> {
> my $cfgini = Config::GitLike->new( confname => $mycnf );
> my @sections = ('client', 'mytop');
> my @params = ('port', 'database', 'username', 'password', 'hostname', 'socket');
>
> if ( not defined $cfgini )
> {
> print "Couldn't load the config-file $mycnf. Skipping.\n";
> }
> else
> {
> if($cfgini->load)
> {
> foreach my $section (@sections) {
> foreach my $param (@params) {
> if ($cfgini->get( key => "$section.$param" ))
> {
> $config{$param} = $cfgini->get( key => "$section.$param" );
> }
> }
> }
> }
> ## map database/password onto db/pass (long version gets precedence in .my.cnf)
> $config{'db'} = $config{'database'} if $config{'database'};
> $config{'pass'} = $config{'password'} if $config{'password'};
> }
> }
signature.asc
Description: OpenPGP digital signature

