Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Keep It Simple, Stupid
 
PerlMonks  

Re: Some functions in .xs file can't be found

by bulk88 (Priest)
on Nov 13, 2013 at 06:37 UTC ( #1062338=note: print w/ replies, xml ) Need Help??


in reply to Some functions in .xs file can't be found

xs/tag.xs has in it

#include "tag.h" MODULE = Audio::TagLib PACKAGE = Audio::TagLib::Tag PROTOTYPES: ENABLE ################################################################ # # PUBLIC MEMBER FUNCTIONS # ################################################################ void TagLib::Tag::DESTROY() CODE: /* skip if READONLY flag on */ if(!SvREADONLY(SvRV(ST(0)))) delete THIS;
see "PACKAGE = Audio::TagLib::Tag"? That is where the method calls will wind up in. But since this is C++ XS which I'm not familiar with, not C XS, I think the "TagLib::Tag::" get stripped off.

As others said, your header() method in XS exists in a different class than you want it. Check the docs of your C++ library whether the TagLib::Tag class has a header method or not. According to http://taglib.github.io/api/classTagLib_1_1Tag.html it does not.

BTW, you should also mention you are the CPAN maintainer of Audio-TagLib ;)


Comment on Re: Some functions in .xs file can't be found
Download Code
Re^2: Some functions in .xs file can't be found
by geoffleach (Beadle) on Nov 13, 2013 at 23:11 UTC
    OK, you got me. I confess I am the maintainer, alas.

    The good news is that I was shooting myself in the foot by using the wrong abstraction for the file being manipulated. I needed to use Audio::TagLib::MPEG::File rather than Audio::TagLib::FileRef. The latter supports more genereic tag methods, but not the ID3v2 methods, of which header() is one.

    The bad news is that now I have to write more tests. Sigh.

    Thanks to all who replied.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1062338]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (17)
As of 2014-04-17 15:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (453 votes), past polls