[ww-devel] Making Perl modules available
Andrew Dabrowski
dabrowsa at indiana.edu
Mon Jun 29 13:39:22 EDT 2015
I should to my earlier message that I did restart httpd. I'm running
Arch Linux.
I thought it would be handy to make Perl's Data::Dumper available for
debugging. So on my office computer I added the line
[qw(Data::Dumper)]
to ${pg}{modules} in defaults.config. But it didn't work, I still get an
error.
This is the code in my pg file to display debugging info.
BEGIN_TEXT
\{ Dumper @$socwelbest \}
END_TEXT
The display is this.
Here's the error message.
Warning messages
* |ERROR in old_safe_ev, PGbasicmacros.pl: <PRE>|
* |## There is an error occuring inside evaluation brackets \{
...code... \}|
* |## somewhere in an EV2 or EV3 or BEGIN_TEXT block.|
* |## Code evaluated:|
* |## Dumper @$socwelbest |
* |##syntax error at line 2 of (eval 1132), near "Dumper @"|
* |##</PRE><BR/>|
* |at (eval 1051) line 1671|
It actually works fine when I use my own dumper function, defined in a
pl file (apart from the fact that my dumper isn't as nice as Perl's).
What's the correct way to do this, i.e. add a aPerl module to webwork?
--
Andrew Dabrowski || ...my suspicion is that the universe is
Indiana University || not only queerer than we suppose, but
Swain East 117 || queerer than we can suppose. -JBS Haldane
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://webwork.maa.org/pipermail/webwork-devel/attachments/20150629/50b3c796/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 1389 bytes
Desc: not available
URL: <http://webwork.maa.org/pipermail/webwork-devel/attachments/20150629/50b3c796/attachment.png>
More information about the webwork-devel
mailing list