The problem was a version conflict... My command line was running 5.8 and the compiler compiles to 5.6. In 5.6 I needed the reference:

use Readonly;
Readonly \my $FOO => 7; # goofy reference needed

So, until the conversion to 5.8 becomes "official", I think I'll just stick with use constant instead...

TIA to all those who're pondering this little oopsie.

Deane



[EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]

11/21/2005 14:38

       
        To:        [email protected]
        cc:        
        Subject:        Re: Readonly wants a reference?



Deane-

Was the book written with Larry's blessing? maybe he had it changed to
confuse people if it wasn't!


more seriously though, try setting a variable and then putting that to the
variable so.....


       use Readonly;
       Readonly my $DATA_COLS => 7;    # this is line 103 in the code...

becomes...

       use Readonly;
       my $cols = 7;
       Readonly my $DATA_COLS => $cols;    # this is line 103 in the
code...


this has an advantage where in the future you can make many duplicate
tables easier, or pass $cols to the function and allow it to become more
modular.... or maybe i'm just trying to find a reason why that might not
be a detriment to have to set a variable first....

-Josh
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to