FAQ.pod (PDL-2.082) | : | FAQ.pod (PDL-2.083) | ||
---|---|---|---|---|
skipping to change at line 1288 | skipping to change at line 1288 | |||
use PDL::Core::Dev; | use PDL::Core::Dev; | |||
use ExtUtils::MakeMaker; | use ExtUtils::MakeMaker; | |||
PDL::Core::Dev->import(); | PDL::Core::Dev->import(); | |||
$package = ["eight.pd",Eight,PDL::Eight,'',1]; | $package = ["eight.pd",Eight,PDL::Eight,'',1]; | |||
%hash = pdlpp_stdargs($package); | %hash = pdlpp_stdargs($package); | |||
WriteMakefile( %hash ); | WriteMakefile( %hash ); | |||
sub MY::postamble {pdlpp_postamble($package)}; | sub MY::postamble {pdlpp_postamble($package)} | |||
The code above should go in a file called Makefile.PL, | The code above should go in a file called Makefile.PL, | |||
which should subsequently be called in the standard | which should subsequently be called in the standard | |||
Perl way: | Perl way: | |||
C<perl Makefile.PL> . | C<perl Makefile.PL> . | |||
This should give you a Makefile and running | This should give you a Makefile and running | |||
C<make> should compile the module for | C<make> should compile the module for | |||
you and | you and | |||
C<make install> will | C<make install> will | |||
install it for you. | install it for you. | |||
skipping to change at line 1418 | skipping to change at line 1418 | |||
use PDL::Core::Dev; | use PDL::Core::Dev; | |||
use ExtUtils::MakeMaker; | use ExtUtils::MakeMaker; | |||
PDL::Core::Dev->import(); | PDL::Core::Dev->import(); | |||
$package = ["quickstats.pd",Quickstats,PDL::Quickstats,'',1]; | $package = ["quickstats.pd",Quickstats,PDL::Quickstats,'',1]; | |||
%hash = pdlpp_stdargs($package); | %hash = pdlpp_stdargs($package); | |||
WriteMakefile( %hash ); | WriteMakefile( %hash ); | |||
sub MY::postamble {pdlpp_postamble($package)}; | sub MY::postamble {pdlpp_postamble($package)} | |||
An example Makefile.PL | An example F<Makefile.PL> | |||
Our new statistic function should now compile using the | Our new statistic function should now compile using the | |||
tried and tested Perl way: | tried and tested Perl way: | |||
C<perl Makefile.PL; make> . | C<perl Makefile.PL; make> . | |||
You should experiment with this function, changing the | You should experiment with this function, changing the | |||
calculations and input and output parameters. In conjunction | calculations and input and output parameters. In conjunction | |||
with the L<PDL::PP> perldoc page this should allow you to quickly | with the L<PDL::PP> perldoc page this should allow you to quickly | |||
write more advanced routines directly in PDL::PP. | write more advanced routines directly in PDL::PP. | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added |