in reply to Re: Attempt to free unreferenced scalar
in thread Attempt to free unreferenced scalar

When I save your code as 'VM_List.pm' and call it like this, it works fine:

use lib 'c:\temp'; use VM_List; my @testarray = (1,2,3); my $test = VM_List->create(\@testarray); print "test=$test";

Although calling it with "-Wc" gives me:

v-string in use/require non-portable at c:\temp/VM_List.pm line 1.

So I believe that should be a 'require' instead of 'use'. And shouldn't your other use lines come after your package line?

Replies are listed 'Best First'.
Re: Re: Re: Attempt to free unreferenced scalar
by John M. Dlugosz (Monsignor) on Feb 23, 2004 at 21:35 UTC
    And shouldn't your other use lines come after your package line?

    Should they?

    For modules that export by default, I want it outside my package space. For strict/warnings, I want them turned on at the earliest oppertunity.