Grokbase Groups Perl inline June 2008
FAQ

On Tuesday 17 June 2008 21:06:32 Sisyphus wrote:
However, both Inline::CPP and InlineX::CPP2XS have no problem with the
following form of the version() function:
Sorry for all the extra replies, but in implementing my workaround, I got the
bug again. :)

This one strikes me as especially curious. As you can see below, the code is
read into a global which Inline::CPP (should be) treating as a string. The
method resolution issue crops up again here.

Note: If I paste the code out of the file that's read into the string
wholesale into a heredoc, it works fine.

----

package MIME::KDE;

use warnings;
use strict;
use version qw(qv);

our $VERSION = qv('0.01');
our $CODE = "";

use File::Basename qw(dirname);

BEGIN {
open(CPP, dirname(__FILE__).'/src/mimelib.cpp')
die "Couldn't locate C++ stub: $!";
local $/ = undef;

$CODE = <CPP>;
close(CPP);

print STDERR "$CODE\n";
};

use Inline CPP =>
Config =>
LIBS => ['-lkio', '-lkdecore'],
INC =>
['-I /usr/include/kde', '-I /usr/include/qt3'],
ENABLE => 'STD_IOSTREAM'
;
use Inline CPP => "$CODE";

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 7 of 11 | next ›
Discussion Overview
groupinline @
categoriesperl
postedJun 17, '08 at 4:25p
activeJun 19, '08 at 2:42a
posts11
users2
websitemetacpan.org...

2 users in discussion

Sisyphus: 6 posts Erik Hollensbe: 5 posts

People

Translate

site design / logo © 2021 Grokbase