Hi,

I came through this old topic and I think we ended up with something wrong
in Trapper::BINMODE's implementation.

Consider we call binmode( STDERR, ':utf8' ) -> this will be delegated to
Trapper::BINMODE( ':utf8 ') -> which will call binmode(':utf8'). And this is
wrong:
 - binmode needs file handle as first argument
 - Probably it would be best to just do nothing in BINMODE. (This is in fact
what currently happens - binmode fails with "bad file descriptor" and has no
effect /such errors don't seem to be printed in tied methods/).


Regards,
Yavor

On Mon, Nov 8, 2010 at 22:01, Yavor Nikolov <[email protected]> wrote:

> I just tested that - daemon starts successfully.
>
> Regards,
> Yavor
>
>
> On Mon, Nov 8, 2010 at 21:51, Kristis Makris <[email protected]> wrote:
>
>> On Mon, 2010-11-08 at 20:22 +0200, Yavor Nikolov wrote:
>> > what about sub BINMODE { binmode(@_) } instead of sub BINMODE
>> > { binmode($_[0]) }? binmode has several (two) parameters and Bugzilla
>> > passes both of them.
>>
>> The first argument is the class instance, the $self. So... that would
>> certainly pass the wrong arguments. The _[0] was wrong too.
>>
>> Perhaps the following?
>>
>> sub BINMODE {
>>    my $self = shift;
>>
>>    binmode(@_);
>> }
>>
>> Could you test this?
>>
>>
>
_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users

Reply via email to