Skip Menu |

This queue is for tickets about the Audio-Extract-PCM CPAN distribution.

Report information
The Basics
Id: 67255
Status: new
Priority: 0/
Queue: Audio-Extract-PCM

People
Owner: Nobody in particular
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.04_59
Fixed in: (no value)



Subject: Exporter magic not working
Hi,

I was toying around with testing the 0.04_59 build of A:E:PCM and found some weird behaviour I don't quite understand with Exporter.

My suspicion is that importing ::Format calls Class::Accessors ->import() instead of Exporters ->import() , which results in no exporting being done.


With Audio::SndFile installed, I repeatedly get errors similar to this one:

http://www.cpantesters.org/cpan/report/848f56aa-ea24-11df-b13c-29c8460775b1

except with the SndFile backed instead of the SOX backend.

t/00-load.t ....... ok  
Show quoted text
# Testing Audio::Extract::PCM 0.04_59, Perl 5.012003, /usr/bin/perl5.12.3
# Testing with sound sine...
# Testing backend SndFile...
t/01-extract.t .... Dubious, test returned 25 (wstat 6400, 0x1900)
Failed 18/18 subtests
Can't locate object method "new" via package "AEPF" (perhaps you forgot to load "AEPF"?) at /tmp/portage/dev-perl-Audio-Extract-PCM-0.45.900_rc/work/Audio-Extract-PCM-0.04_59/blib/lib/Audio/Extract/PCM/Backend/SndFile.pm line 96.
Show quoted text
# Looks like your test exited with 25 before it could output anything.
t/backends.t ...... Dubious, test returned 25 (wstat 6400, 0x1900)
Failed 51/61 subtests
    (less 9 skipped subtests: 1 okay)
Your sox has no ogg
Show quoted text
# Testing backend Mad
# Backend is not available
# Testing backend SndFile
Found Audio::SndFile version: 0.07
Found libsndfile version: libsndfile-1.0.24
Show quoted text
# Testing with file sine.wav
Can't locate object method "new" via package "AEPF" (perhaps you forgot to load "AEPF"?) at /tmp/portage/dev-perl-Audio-Extract-PCM-0.45.900_rc/work/Audio-Extract-PCM-0.04_59/blib/lib/Audio/Extract/PCM/Backend/SndFile.pm line 96.
Show quoted text
# Looks like you planned 61 tests but ran 10.
# Looks like your test exited with 25 just after 10.
t/formats.t ....... ok    
Show quoted text
# big endian test
t/pod-coverage.t .. ok  
t/pod.t ........... ok  
t/zzcleanup.t ..... ok  


I know this is reasonably old code now, and this is a developer release, but I've found by experiementing a simple fix that solves the problem ( I don't understand why exactly yet, but it does workForMe™ )

instead of

use base qw(Exporter);

do

use Exporter qw(import);

This is a feature of Exporter since 5.57 *( "Note: This feature was introduced in version 5.57 of Exporter, released with perl 5.8.3.")

Then all tests proceed to pass.