Skip Menu |
 

This queue is for tickets about the Text-BibTeX CPAN distribution.

Report information
The Basics
Id: 119559
Status: resolved
Priority: 0/
Queue: Text-BibTeX

People
Owner: Nobody in particular
Requestors: karl.wette [...] aei.mpg.de
Cc:
AdminCc:

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



Subject: Text::BibTeX::Entry->new() cannot read from standard input
Date: Thu, 29 Dec 2016 16:36:44 +1300
To: bug-Text-BibTeX [...] rt.cpan.org
From: Karl Wette <karl.wette [...] aei.mpg.de>
Download (untitled) / with headers
text/plain 727b
Hi, Text::BibTeX::Entry->new() cannot read from standard input, if one specifies a filename/handle pair, it instead errors with: new: source argument must be either a Text::BibTeX::File (or descendant) object, filename/filehandle pair, or a string I believe the source of this bug is the following line in Entry.pm: elsif (@source == 2 && defined $source[0] && ! ref $source[0] && fileno ($source[1])) Since standard input is typically on file descriptor #0, the test "fileno ($source[1]))", i.e. "fileno ($source[1])) != 0" fails. This should probably be changed to "fileno ($source[1])) >= 0", or some other test for file handles. Thanks for creating/maintaining this module, I have found it very useful! Cheers, Karl
Download (untitled) / with headers
text/plain 828b
On Wed Dec 28 22:37:42 2016, karl.wette@aei.mpg.de wrote: Show quoted text
> Hi, > > Text::BibTeX::Entry->new() cannot read from standard input, if one > specifies a filename/handle pair, it instead errors with: > > new: source argument must be either a Text::BibTeX::File (or descendant) > object, filename/filehandle pair, or a string > > I believe the source of this bug is the following line in Entry.pm: > > elsif (@source == 2 && defined $source[0] && ! ref $source[0] && fileno > ($source[1])) > > Since standard input is typically on file descriptor #0, the test "fileno > ($source[1]))", i.e. "fileno ($source[1])) != 0" fails. This should > probably be changed to "fileno ($source[1])) >= 0", or some other test for > file handles.
Applied your suggestion to the github repository. Can you test if it works for you? Thank you!
Subject: Re: [rt.cpan.org #119559] Text::BibTeX::Entry->new() cannot read from standard input
Date: Sat, 31 Dec 2016 23:26:33 +1300
To: bug-Text-BibTeX [...] rt.cpan.org
From: Karl Wette <karl.wette [...] aei.mpg.de>
I can confirm that this bug is now fixed in the github repository. Thanks! On 30 December 2016 at 05:55, Alberto Simões via RT < bug-Text-BibTeX@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=119559 > > > On Wed Dec 28 22:37:42 2016, karl.wette@aei.mpg.de wrote:
> > Hi, > > > > Text::BibTeX::Entry->new() cannot read from standard input, if one > > specifies a filename/handle pair, it instead errors with: > > > > new: source argument must be either a Text::BibTeX::File (or descendant) > > object, filename/filehandle pair, or a string > > > > I believe the source of this bug is the following line in Entry.pm: > > > > elsif (@source == 2 && defined $source[0] && ! ref $source[0] && fileno > > ($source[1])) > > > > Since standard input is typically on file descriptor #0, the test "fileno > > ($source[1]))", i.e. "fileno ($source[1])) != 0" fails. This should > > probably be changed to "fileno ($source[1])) >= 0", or some other test
> for
> > file handles.
> > > Applied your suggestion to the github repository. > Can you test if it works for you? > > Thank you! > >
Download (untitled) / with headers
text/plain 152b
On Sat Dec 31 05:27:30 2016, karl.wette@aei.mpg.de wrote: Show quoted text
> I can confirm that this bug is now fixed in the github repository. > Thanks! >
\o/ 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.