http://www.perlmonks.org?node_id=289623


in reply to Algorithm::Treap (code)
in thread Algorithm::Treap

Uh oh (what's going on?):
perl treap.pm
Subroutine import redefined at Treap.pm line 67.
Subroutine heap_lt redefined at Treap.pm line 127.
Subroutine key_lt redefined at Treap.pm line 128.
Subroutine key_gt redefined at Treap.pm line 129.
Subroutine new redefined at Treap.pm line 131.
Subroutine find_path_to_node redefined at Treap.pm line 184.
Subroutine find_node redefined at Treap.pm line 209.
Subroutine _shift_up redefined at Treap.pm line 241.
Subroutine _shift_down redefined at Treap.pm line 316.
Subroutine Store redefined at Treap.pm line 410.
Subroutine Delete redefined at Treap.pm line 484.
Subroutine Exists redefined at Treap.pm line 517.
Subroutine Clear redefined at Treap.pm line 526.
Subroutine Firstkey redefined at Treap.pm line 551.
Subroutine Nextkey redefined at Treap.pm line 565.
Subroutine Fetch redefined at Treap.pm line 579.
Subroutine FetchUser redefined at Treap.pm line 586.
Subroutine DESTROY redefined at Treap.pm line 598.
Subroutine count redefined at Treap.pm line 611.
Subroutine left redefined at Treap.pm line 614.
Subroutine right redefined at Treap.pm line 617.
Subroutine root redefined at Treap.pm line 620.
Subroutine _sub_as_list redefined at Treap.pm line 622.
Subroutine breadth_first redefined at Treap.pm line 631.
Subroutine in_order redefined at Treap.pm line 676.
Subroutine rev_order redefined at Treap.pm line 690.
Subroutine heap_order redefined at Treap.pm line 705.
Subroutine _heap_order_recurse redefined at Treap.pm line 715.
Subroutine top redefined at Treap.pm line 764.
Subroutine extract_top redefined at Treap.pm line 774.
Subroutine print_order redefined at Treap.pm line 788.
Subroutine __dump redefined at Treap.pm line 810.
Subroutine dump_vert redefined at Treap.pm line 817.
Subroutine __center redefined at Treap.pm line 821.
Subroutine dump_tree redefined at Treap.pm line 840.
Subroutine Tied_Hash redefined at Treap.pm line 913.
Subroutine FETCH redefined at treap.pm line 924.
Subroutine STORE redefined at treap.pm line 929.
function 'new' already defined in package Treap::_Node at treap.pm line 950
BEGIN failed--compilation aborted at treap.pm line 958.

Replies are listed 'Best First'.
Re: Re: Algorithm::Treap (code)
by demerphq (Chancellor) on Sep 07, 2003 at 23:49 UTC

    Uh oh (what's going on?):

    I dont know. This doesnt make sense to me. Obviously it doesnt happen here, and at least one other person has had the code pass all tests. Can you double check that you copied the code correctly?


    ---
    demerphq

    <Elian> And I do take a kind of perverse pleasure in having an OO assembly language...
      If treap.pm is in the current directory, it doesn't work, but if I am not, it works. Very weird.

        Ok, im totally baffled. For a while I had the same issue as you. Now with the latest code it seems to work fine. But the really worrying thing is now I dont have a clue what I changed to make it so. As far as I cant tell nothing drammatic. And ive not been able to recreate the error again. Its very perplexing. Please can you redownload the scratchpad and run it as is (including the test code in the DATA section) from the same directory?

        Cheers and thanks for the heads up about this. It seems there is weirdness afoot.


        ---
        demerphq

        <Elian> And I do take a kind of perverse pleasure in having an OO assembly language...

        Wow. Is that ever weird. I _do_not_ understand whats going on here at all.

        Maybe some kind monk will explain?


        ---
        demerphq

        <Elian> And I do take a kind of perverse pleasure in having an OO assembly language...
      Perl 5.6, Windows NT ActivePerl Build 633. I didn't copy anything, I clicked the download code link, and saved as.

        Interesting and perplexing. When I downloaded the code as you describe and ran it, it work fine, except for some complaints about some things being used only once. Yet when I run the raw code I have here the same doesn't happen. Im curious what happens if you put it in the correct location in the site/lib tree? Also, you should realize that the download code will actually wrap both code sections into one file. So you should extract the other part which is the test code. Although in this case it is after the __DATA__ line and shouldnt matter. Also those used only once errors only occur on the downloaded code and not my working copy. Weird. Anyway, im posting an update to the code to make the only once at a time errors go away.


        ---
        demerphq

        <Elian> And I do take a kind of perverse pleasure in having an OO assembly language...