[system] / trunk / webwork / system / courseScripts / PGcomplexmacros.pl Repository:
ViewVC logotype

Diff of /trunk/webwork/system/courseScripts/PGcomplexmacros.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 326 Revision 327
25 be_strict(); 25 be_strict();
26 26
27} 27}
28 28
29 sub _PGcomplexmacros_init { 29 sub _PGcomplexmacros_init {
30 30}
31 31
32# export functions from Complex1. 32# export functions from Complex1.
33 33
34 foreach my $f (@Complex1::EXPORT) { 34 foreach my $f (@Complex1::EXPORT) {
35 #PG_restricted_eval("\*$f = \*Complex1::$f"); # this is too clever -- 35# #PG_restricted_eval("\*$f = \*Complex1::$f"); # this is too clever --
36 # the original subroutines are destroyed 36 # the original subroutines are destroyed
37 next if $f eq 'sqrt'; #exporting the square root caused conflicts with the standard version 37 next if $f eq 'sqrt'; #exporting the square root caused conflicts with the standard version
38 # You can still use Complex1::sqrt to take square root of complex numbers 38 # You can still use Complex1::sqrt to take square root of complex numbers
39 next if $f eq 'log'; #exporting loq caused conflicts with the standard version 39 next if $f eq 'log'; #exporting loq caused conflicts with the standard version
40 # You can still use Complex1::log to take square root of complex numbers 40 # You can still use Complex1::log to take square root of complex numbers
41 41
42 my $string = qq{ 42 my $string = qq{
43 &Complex1::$f; 43 &Complex1::$f;
44 } 44 };
45 45
46 PG_restricted_eval($string); 46 PG_restricted_eval($string);
47 }; 47 };
48 48
49} 49
50 50
51 51
52 52
53# You need to add 53# You need to add
54# sub i(); # to your problem or else to dangerousMacros.pl 54# sub i(); # to your problem or else to dangerousMacros.pl

Legend:
Removed from v.326  
changed lines
  Added in v.327

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9