The trust error handling code expects five parameters:

        my $trusterror = sub {
                my $msg=shift;
                my ($err, $file, $lineno, $url)=@_;

but it is only ever invoked with one, e.g.

                if (! $trusted && /[[:cntrl:]]/) {
                        $trusterror->("illegal control character");
                }

For me, this results in a mess when I have an untrusted file:

    Use of uninitialized value $err in concatenation (.) or string at
/home/adam/bin/mr line 1295.
    Use of uninitialized value $file in concatenation (.) or string at
/home/adam/bin/mr line 1295.
    Use of uninitialized value $lineno in concatenation (.) or string
at /home/adam/bin/mr line 1295.
    mr:  in untrusted  line
    (To trust this file, list it in ~/.mrtrust.)

Ideally there would be a test suite to catch things like this.
_______________________________________________
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home

Reply via email to