teel / stasiscl

Automatically exported from code.google.com/p/stasiscl
0 stars 0 forks source link

"strict refs" error #64

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When I try to run any parses I get this error:

//rout_to_stasis/stasis: Using directory:
/rout_to_where_the_report_should_be_generated
Can't use string ("8/16") as a HASH ref while "strict refs" in use at
//rout_to_stasis/stasis line 663, <$fh> line 1.

How could I fix this?

Original issue reported on code.google.com by caleb...@gmail.com on 14 Dec 2008 at 12:38

GoogleCodeExporter commented 8 years ago
Can you try with the latest revision (r188) and see if you get the same error, 
or at least tell me what revision 
you're using? 

Original comment by gianmerlino@gmail.com on 14 Dec 2008 at 9:12

GoogleCodeExporter commented 8 years ago
I get the same error with revision r188 too.

Original comment by caleb...@gmail.com on 14 Dec 2008 at 10:36

GoogleCodeExporter commented 8 years ago
What options are you using? Also, can you check the file "stasis" and tell me 
what is on line 663? I ask because in 
the most recent copy, line 663 is a comment, so I don't think your file matches 
my file exactly (either that, or 
your perl is counting lines differently).

Original comment by gianmerlino@gmail.com on 14 Dec 2008 at 6:14

GoogleCodeExporter commented 8 years ago
Ohh yeah, sorry!

I need to include a couple of lines at the top of file because of the host I'm
running the script, so the script knows where to look for the perl modules.

I use the following options: add -dir, ver -2, -attempt, -file
This is the line in question:

        $first ||= $pline->{t};

Original comment by caleb...@gmail.com on 14 Dec 2008 at 7:50

GoogleCodeExporter commented 8 years ago
It sounds like your version of lib/Stasis/Parser.pm might be out of date, or 
it's not being constructed properly by 
your version of the "stasis" program.

%pline used to be a hash, but more recent versions of the parser will return 
hash references instead. If your 
parser was still returning hashes instead of hashrefs, that would explain the 
error you got: "Can't use string as 
HASH ref" (it's a string because when evaluated in scalar context, a hash 
becomes a string like "8/16" based on 
how much buckets have been used and allocated).

Original comment by gianmerlino@gmail.com on 14 Dec 2008 at 11:05

GoogleCodeExporter commented 8 years ago
Reopen this if you still have a problem using a fresh working copy. I still 
think this is probably a problem due to 
an inconsistency in your copy.

Original comment by gianmerlino@gmail.com on 23 Jan 2009 at 5:53