in reply to Re: How to get all combinations
in thread How to get all combinations

I copied the script, there seems to be something goofy with my algorithm combinatorics locations:

#! perl -slw use strict; use lib '/opt/perl5/perlbrew/bin/perlbrew/perls/perl-5.14.0/lib/site_p +erl/5.14.0/darwin-2level' use Algorithm::Combinatorics qw[ combinations ]; my @total = ( "1-S","2-S","3-S","4-S","5-S","6-S","7-S","8-S","9-S","10-S","11-S","1 +2-S","13-S","14-S", "1-H","2-H","3-H","4-H","5-H","6-H","7-H","8-H","9-H","10-H","11-H","1 +2-H","13-H","14-H", "1-R","2-R","3-R","4-R","5-R","6-R","7-R","8-R","9-R","10-R","11-R","1 +2-R","13-R","14-R", "1-K","2-K","3-K","4-K","5-K","6-K","7-K","8-K","9-K","10-K","11-K","1 +2-K","13-K","14-K" ); my $iter = combinations( [0..55], 5 ); print join ' ', @total[ @$_ ] while defined( $_ = $iter->next );

Combinatorics.pm:9: this one appears to be wrong: XSLoader::load('Algorithm::Combinatorics', $VERSION);

getallcombos.pl:5: Compilation failed in require getallcombos.pl:5: BEGIN failed--compilation aborted this sentence appears to be wrong use Algorithm::Combinatorics qw[ combinations ];
Everything is installed correctly, however it seemed in the wrong directory so I screwed something up, I think some things are out of place, would you know how I can solve this problem?

Replies are listed 'Best First'.
Re^3: How to get all combinations
by BrowserUk (Patriarch) on Jul 07, 2012 at 01:32 UTC
    Everything is installed correctly

    Sorry, but that is obviously not the case.

    Also, I know nothing of perlbrew or darwin (is that Apple?), so I cannot begin to suggest how to fix your installation.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

      I have everything working, I only need to know what XSLoader::load is trying to load in the combinatorics.pm file, I had copied a file and placed it somewhere else, the references to the PM's where all wrong the only one left is what XSloader wants to load. Can you tell me which file that is? it's not about perlbrew or apple in any way it is purely misreferencing

        I had copied a file and placed it somewhere else,

        If you installed the package by copying files, and you put them in the wrong places, then the installation is not correct.

        And I don't know enough about your system setup to help you correct it.

        If you do the installation using the proper tools -- cpan shell or whatever is appropriate on your system -- the problem will go away.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

        The start of some sanity?

Re^3: How to get all combinations
by robertw (Sexton) on Jul 07, 2012 at 00:31 UTC
    In the library I use there is only combinatorics.pm, I also have a combinatorics directory that contains an bundle, and a bs file which i dont refer to, this directory is located in the place it usually installs the .pm file:S, I hope this helps for clarity
      You will not be able to just copy a module with a compiled c component into your 'lib' and expect it to work. If you want to try and outsmart the Perl Dynaloader, read perldoc Dynaloader and possibly set @dl_library_path.

      I'm not really a human, but I play one on earth.
      Old Perl Programmer Haiku ................... flash japh