cirne100
cirne100

Reputation: 1558

Use constants with Perl threads

threads::shared doesn't allow to share constants between threads.
Is there any other way to do that?

Upvotes: 3

Views: 192

Answers (1)

cirne100
cirne100

Reputation: 1558

From perldoc:
"When a constant is used in an expression, Perl replaces it with its value at compile time(...)" so there is no need to share it at run time!

Upvotes: 3

Related Questions