Click here to get back home

Using Set::Object - evidently I need compiled code?

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Using Set::Object - evidently I need compiled code? Dave Stallard 03-31-2008
Posted by Dave Stallard on March 31, 2008, 10:21 pm
Please log in for more thread options
I'd like to have sets of references (I'm from Java; I'm a Set guy). I
understand that you cannot use a reference as a hash key, and that it
gets stringified if you try. So, to make my Set object, I've been
hashing the reference to itself (or more properly, hashing the
stringification to the reference).

I would like to not reinvent the wheel, however, and have found
Set::Object. But it doesn't work when I try to 'use Set::Object',
claiming it can't find something (even though the module is in the
path). The doc for Set::Object refers to XS code, which I gather is
lower-level C stuff. Do I need to link to a DLL or Shared Object or
something? Or worse yet, build it? BTW, I'd like this to run on both
XP and Linux.

Thanks, and sorry for the elementary question.

Dave

Posted by John Bokma on April 1, 2008, 1:59 am
Please log in for more thread options

> I would like to not reinvent the wheel, however, and have found
> Set::Object. But it doesn't work when I try to 'use Set::Object',
> claiming it can't find something

Why didn't you post the "claim" (message) you got?

--
John

http://johnbokma.com/perl/

Posted by Dave Stallard on April 1, 2008, 8:26 pm
Please log in for more thread options
John Bokma wrote:
>
>> I would like to not reinvent the wheel, however, and have found
>> Set::Object. But it doesn't work when I try to 'use Set::Object',
>> claiming it can't find something
>
> Why didn't you post the "claim" (message) you got?

Hmm, why not indeed. Here it is:

perl test-set.pl
Can't locate loadable object for module Set::Object in @INC (@INC
contains: C:/Program Files/Perl/site/lib C:/Program Files/Perl/lib .) at
test-set.pl line 4
Compilation failed in require at test-set.pl line 4.
BEGIN failed--compilation aborted at test-set.pl line 4.

Posted by sisyphus on April 1, 2008, 10:21 pm
Please log in for more thread options
> John Bokma wrote:
>
> >> I would like to not reinvent the wheel, however, and have found
> >> Set::Object. =A0But it doesn't work when I try to 'use Set::Object',
> >> claiming it can't find something
>
> > Why didn't you post the "claim" (message) you got?
>
> Hmm, why not indeed. =A0Here it is:
>
> perl test-set.pl
> Can't locate loadable object for module Set::Object in @INC (@INC
> contains: C:/Program Files/Perl/site/lib C:/Program Files/Perl/lib .) at
> test-set.pl line 4
> Compilation failed in require at test-set.pl line 4.
> BEGIN failed--compilation aborted at test-set.pl line 4.

Yep - it found Object.pm ok, but not Object.dll (which is the compiled
part that is created and installed as part of the build process).

For Windows XP you can install pre-compiled binaries with:
ppm install Set-Object

That should work fine for perl 5.10 (as it will automatically pick up
the ActiveState package) but if you're running perl 5.8, you'll need
to add the trouchelle rep to your list of repositories (as ActiveState
don't appear to have a ppm for Set-Object for 5.8). See
http://trouchelle.com/perl/ppmrepview.pl . It wouldn't hurt to add
both that rep and the uwinnipeg anyway - for the latter, follow the
appropriate link at http://theoryx5.uwinnipeg.ca/ .

If you're using an ActiveState build of perl on linux, then you can
also use ppm there as well.
Otherwise for linux, you'll need to either install vendor-supplied
binaries (if they exist) or build from source yourself. See 'perldoc
perlmodinstall' for the latter.

Incidentally, you can check what's available at ActiveState in the way
of pre-compiled binaries (for perls 5.6, 5.8 and 5.10) at
http://ppm.activestate.com/BuildStatus/ .

Cheers,
Rob

Similar ThreadsPosted
ANNOUNCE: Code::Dumper - a ::Dumper for code. Available on CPAN November 21, 2005, 11:03 am
Pre-compiled SSL Perl modules August 6, 2006, 7:11 am
Sort::Maker : anonymous sub is compiled outside of my module December 5, 2006, 8:25 am
Compiled .exe of Perl does not work when using Crypt::SSLeay May 14, 2007, 7:35 pm
Running compiled Inline C perl scripts on more than one machine February 9, 2006, 12:12 pm
unusual behaviour of perl script compiled with perlapp on hp-ux11i May 8, 2005, 7:52 am
Please help with this code June 10, 2007, 3:40 pm
what is wrong in this code November 13, 2005, 10:40 pm
Image Magick code help November 29, 2004, 12:14 pm
Image Magick code help December 3, 2004, 6:43 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap