Skip Menu |

This queue is for tickets about the MP3-Tag CPAN distribution.

Report information
The Basics
Id: 39412
Status: rejected
Priority: 0/
Queue: MP3-Tag

People
Owner: Nobody in particular
Requestors: davidp [...] preshweb.co.uk
Cc:
AdminCc:

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



Subject: Undeclared dependence on MP3::Info causes test failures
I have MP3::Tag installed but it fails because MP3::Info is not installed. I see that MP3::Info is an "optional" dependency as it's only needed for certain calls, but I think the lack of that module ought to be handled more cleanly; perhaps issuing a warning and returning undef if it's not available? This caused a test failure for one of my modules which uses MP3::Tag, and died when it tried to use an MP3::Tag method which requires MP3::Info. Thoughts?
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #39412] Undeclared dependence on MP3::Info causes test failures
Date: Fri, 19 Sep 2008 08:26:15 -0700
To: David Precious via RT <bug-MP3-Tag [...] rt.cpan.org>
From: Ilya Zakharevich <nospam-abuse [...] ilyaz.org>
On Fri, Sep 19, 2008 at 06:37:34AM -0400, David Precious via RT wrote: Show quoted text
> Fri Sep 19 06:37:27 2008: Request 39412 was acted upon. > Transaction: Ticket created by BIGPRESH > Queue: MP3-Tag > Subject: Undeclared dependence on MP3::Info causes test failures
Which test failures? Show quoted text
> Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: davidp@preshweb.co.uk > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=39412 > > > > I have MP3::Tag installed but it fails because MP3::Info is not installed. > > I see that MP3::Info is an "optional" dependency as it's only needed for > certain calls, but I think the lack of that module ought to be handled > more cleanly; perhaps issuing a warning and returning undef if it's not > available?
Returning undef has a defined meaning. Show quoted text
> This caused a test failure for one of my modules which uses MP3::Tag, > and died when it tried to use an MP3::Tag method which requires MP3::Info.
I do not follow: is it my problem, or your problem? Why not use `eval', and test $@? Puzzled, Ilya
Subject: Re: [rt.cpan.org #39412] Undeclared dependence on MP3::Info causes test failures
Date: Mon, 22 Sep 2008 10:49:33 +0100
To: bug-MP3-Tag [...] rt.cpan.org
From: David Precious <davidp [...] preshweb.co.uk>
On 09/19/2008 04:28 PM, Ilya Zakharevich via RT wrote: Show quoted text
>> Subject: Undeclared dependence on MP3::Info causes test failures
> > Which test failures?
ISTR receiving test failure reports, but strangely I can't find them on cpantesters now. I also saw a failure myself, installing from a fresh system, MP3::Tag was installed as I declare a dependency on it, but MP3::Info wasn't installed. Show quoted text
>> I have MP3::Tag installed but it fails because MP3::Info is not installed. >> >> I see that MP3::Info is an "optional" dependency as it's only needed for >> certain calls, but I think the lack of that module ought to be handled >> more cleanly; perhaps issuing a warning and returning undef if it's not >> available?
> > Returning undef has a defined meaning.
Fair enough. Show quoted text
>> This caused a test failure for one of my modules which uses MP3::Tag, >> and died when it tried to use an MP3::Tag method which requires MP3::Info.
> > I do not follow: is it my problem, or your problem? Why not use > `eval', and test $@?
Yeah, I can do that to fix it from my end, or declare MP3::Info as a dependency for my module, since it needs the functionality for which it is required. I was just trying to point out that MP3::Tag just requiring MP3::Info and dieing if it's not available was leading to failures down the line. Fine to close the ticket, I'll work around it in my module, but if you can think of a nice way for MP3::Tag to cleanly indicate "I can't do what you asked for because you don't have MP3::Info installed", I personally think that would be an improvement. Cheers David P
Subject: Re: [rt.cpan.org #39412] Undeclared dependence on MP3::Info causes test failures
Date: Mon, 22 Sep 2008 09:25:37 -0700
To: David Precious via RT <bug-MP3-Tag [...] rt.cpan.org>
From: Ilya Zakharevich <nospam-abuse [...] ilyaz.org>
On Mon, Sep 22, 2008 at 05:51:04AM -0400, David Precious via RT wrote: Show quoted text
> I also saw a failure myself, installing from a fresh system, MP3::Tag > was installed as I declare a dependency on it, but MP3::Info wasn't > installed.
Feel free to send patches which would list MP3::Info as "useful but optional" dependency. Show quoted text
> > I do not follow: is it my problem, or your problem? Why not use > > `eval', and test $@?
> > Yeah, I can do that to fix it from my end, or declare MP3::Info as a > dependency for my module, since it needs the functionality for which it > is required.
Sounds reasonable. Show quoted text
> I was just trying to point out that MP3::Tag just requiring MP3::Info
No, it is not. Show quoted text
> and dieing if it's not available was leading to failures down the line. > Fine to close the ticket, I'll work around it in my module, but if you > can think of a nice way for MP3::Tag to cleanly indicate "I can't do > what you asked for because you don't have MP3::Info installed", I > personally think that would be an improvement.
??? How require() is different from what you want? IMO, the functionality you require is already there... Puzzled, Ilya
Closing this old ticket :)