# Sample user perldlrc # # The perldl shell executes "use PDL;", which loads all of the PDL core # modules into perl. But there are other bits of functionality that # you probably want, that require separate loading. This file # contains a startup sequence for the perldl shell to load in your # favorite additional modules, so you don't have to load them manually # each time you want them. It also sets some nice defaults for the # shell user interface. # # This file should be copied to your home directory as ".perldlrc". # # You can add any perl code at all that you'd like to execute each time # perldl gets started. # # This file is in the public domain: modify and share as you wish. # # Make sure the distribution defaults get loaded -- the "require" # searches through Perl's built-in @INC path for finding modules. require('PDL/default.perldlrc'); # Some useful modules to load by default use PDL::Graphics::PGPLOT; use PDL::Graphics::PGPLOT::Window; use PDL::AutoLoader; use PDL::Math; use PDL::IO::Pic; use PDL::Image2D; use PDL::FFT; use PDL::DiskCache; use PDL::IO::Dumper; use PDL::GSL::DIFF; use PDL::GSL::INTERP; use PDL::GSL::RNG; # # There are two separate paths: the normal perl path # that's used for finding perl modules (that's the @INC path, which Perl # normally keeps track of), and one that is used for finding ".pdl" # files for automagic loading (that's the @PDLLIB path, which can also be # set up through the PDLLIB environment variable). Here are a few useful # additions to each one. # push(@INC,"$ENV{HOME}/PDL"); # Put ~/PDL in module search path unless (defined $ENV{PDLLIB}) { push(@PDLLIB,"."); # Put working dir in the autoloader search path push(@PDLLIB,"+./PDL"); # Put ./PDL and all subdirs in the search path push(@PDLLIB,"+~/PDL"); # Put ~/PDL and all subdirs in the search path push(@PDLLIB,"+./pdl"); push(@PDLLIB,"+~/pdl"); } $PDL::AutoLoader::Rescan = 1; # Rescan .pdl files each time a prompt goes out # # Set up perldl shell special variables # $PERLDL::MULTI = 1; # Accept multiline commands (see "man perldl") # $PERLDL::NO_EOF = 1; # Prevent accidental ^D; uncomment to activate # # Emit a friendly greeting... # print "\nUsing perldl again? Good for you!\n"; print "\nType 'help' or '?' for basic help.\n"; 1; # Successful completion