[ww-devel] Making Perl modules available
Andrew Dabrowski
dabrowsa at indiana.edu
Tue Jun 30 13:23:51 EDT 2015
On 06/29/2015 07:44 PM, Davide P. Cervone wrote:
>> A related question: There are a number of functions in List::Util that would be useful in writing problems. Most have been reimplemented in PGauxiliaryFunctions.pl, but would there be a security risk in adding List::Util to the real server?
> I don't see anything that would be a security risk, but there are some things that might be issues for PG problems. A number of the functions take code blocks (like the sort does), and these use variables $a and $b that are not localized, if I recall correctly. This could interact badly with problems that use $a and $b as coefficients or other variables (many problems do).
I see, I didn't think anything that CS101 would be a problem. :(
> This is one reason that the perl sort function is replaced by PGsort in PG.
I do think that a number of the utility functions in List::Util, like
sum and reduce, should have been given the same treatment.
>
> I'm happy to include additional perl modules when they add significant functionality; but my impression is that List::Util are basically convenience routines that could all be handled fairly readily "by hand" either in perl directly, or through a macro file that doesn't require additional modules.
Sure, but I take it that you're a professional. Many of us are math
educators who are only amateur coders, and I would rather use a utility,
even a very simple one, that's been tested and debugged over years by
pros - there's no obvious upper bound on the stupidity of my code.
> Davide
>
--
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
More information about the webwork-devel
mailing list