I've got a problem with this one for the Installable CPP module:

package CPPTest;
use strict;

use vars qw($VERSION);
$VERSION = '0.01';

use Cwd qw(abs_path);

# Config for Inline::MakeMaker
use Inline CPP => 'DATA',
                NAME => 'CPPTest',
                VERSION => '0.01';

1;

__DATA__

__CPP__

int add(int x, int y) {
  return x + y;
}

int subtract(int x, int y) {
  return x - y;
}

---

These tests work:
BEGIN { $^W = 0; $| = 1; print "1..3\n"; }
END {print "not ok 1\n" unless $loaded;}
use CPPTest;
$loaded = 1;
print "ok 1\n";
print CPPTest::add(9, 16) == 25 ? "ok 2" : "not ok 2", "\n";
print CPPTest::subtract(9, 16) == -7 ? "ok 3" : "not ok 3", "\n";

But when installed it doesnt work:
[piers@kogut cpptest]$ perl -MCPPTest -e "print CPPTest::add(3,4)"
The extension 'CPPTest' is not properly installed in path:
  'usr/lib/perl5/site_perl/5.6.1/i386-linux'

If this is a CPAN/distributed module, you may need to reinstall it on
your
system.

To allow Inline to compile the module in a temporary cache, simply
remove the
Inline config option 'VERSION=' from the CPPTest module.

 at -e line 0
INIT failed--call queue aborted, <DATA> line 1.


I regressed Inline back to TRIAL3 and it worked again, so it appears to
be something arround the changes.

Where do I start looking?

Cheers.

On Fri, Oct 11, 2002 at 09:50:27PM -0700, Brian Ingerson wrote:
> http://ttul.org/~ingy/release/Inline-0.44-TRIAL4.tar.gz
> 
> Well this is a pretty big one, and some pretty big thanks go out to Mitchell
> Charity for some pretty big patches.
> 
> Here's the Changes:
> 
>     version: 0.44
>     date:    Fri Oct 11 18:09:03 PDT 2002
>     changes:
>       - Added the USING keyword. This allows you to specify a list of modules
>       which can override certain parts of the Inline process.
>       - Added Inline::C::ParseRecDescent and Inline::C::ParseRegExp to
>       provide two (hopefully) functionally identical C parsers. You use
>       one of these by saying 'use Inline C => DATA => USING => "ParseRegExp"'.
>       Big thanks to Mitchell Charity for ParseRegExp. It's over two orders
>       of magnitude faster than ParseRecDescent.
>       - Added the more diagnostics to BUILD_NOISY.
>       - Added BUILD_TIMERS for benchmarking the Inline build process.
> 
>     ---
>     version: 0.44
>     date:    Wed Oct  9 19:03:34 PDT 2002
>     changes:
>       - Applied a (BIG) patch to the Inline distribution to use File::Spec
>       to manipulate all file paths. Thanks Mitchell Charity!
> 
> Hopefully that explains things pretty well. The File::Spec stuff should
> help get us closer to working with VMS and others. Testing here would be
> appreciated. Inline::C::ParseRegExp is the first step towards speeding things
> up. It also might work better than the old ::ParseRecDescent code in
> detecting Nicholaus' signature combinations. So give that a try with your old
> code. I'm strongly considering making ParseRegExp the default very soon, and
> eliminating the strong dependency on Parse::RecDescent.
> 
> If all this makes your head spin, try playing around with this one liner:
> 
>     perl -MInline=force,noisy,timers -e 'use Inline C=>q{void 
>h(char*n){printf("hello, %s\n",n);}},USING=>ParseRegExp;h"inline"'
> 
> I'd be interesting in hearing about your various benchmarks, and ideas for
> speeding things up.
> 
> That's about it. Oh yeah; I didn't break Inline::CPP AFAICT.
> 
> Cheers, Brian

Reply via email to