PDLA

 view release on metacpan or  search on metacpan

Basic/SourceFilter/FilterUtilCall.pm  view on Meta::CPAN

use Filter::Util::Call;

##############################
# If you mess with the import filter, please also change the pdlpp importer 
# just above this comment!  They both do similar things, but one to an eval string
# and one to an import file.
#   --CED 5-Nov-2007
#
sub import {
    my ($class) = @_;
    ($file,$offset) = (caller)[1,2];  # for error reporting
    $offset++;
    
    ## Parse class name into a regexp suitable for filtration
    my $terminator = terminator_regexp($class);

    filter_add(
		sub {
		    my ($status, $off, $end);
		    my $count = 0;
		    my $data = "";

Demos/Screen.pm  view on Meta::CPAN

   defined($PERLDL::TERM) ? $PERLDL::TERM->readline($prompt) : ( print $prompt, <> );
}

sub act($) {
   home();
   my $script = $_[0];
   $script =~ s/^(\s*)output/$1print/mg;
   print "---- Code:";
   print $script;
   print "---- Output:\n";
   my $pack = (caller)[0];
#	eval "package $pack; use PDLA; $_[0]";
   eval "package $pack; use PDLA; $_[0]";
   print "----\nOOPS!!! Something went wrong, please make a bug report!: $@\n----\n" if $@;
   my $prompt = "---- (press enter)";
   defined($PERLDL::TERM) ? $PERLDL::TERM->readline($prompt) : ( print $prompt, <> );
}

sub actnw($) {
   home();
   my $script = $_[0];
   $script =~ s/^(\s*)output/$1print/mg;
   print "---- Code:";
   print $script;
   print "---- Output:\n";
   my $pack = (caller)[0];
#	eval "package $pack; use PDLA; $_[0]";
   eval "package $pack; use PDLA; $_[0]";
   print "----\n";
   print "----\nOOPS!!! Something went wrong, please make a bug report!: $@\n----\n" if $@;
}

sub output {print @_}

Doc/Doc/Perldl.pm  view on Meta::CPAN

sub help {
  if ($#_>-1) {
      require PDLA::Dbg;
      my $topic = shift;
      if (PDLA::Core::blessed($topic) && $topic->can('px')) {
	  local $PDLA::debug = 1;
	  $topic->px('This variable is');
      } else {
	  $topic = 'PDLA::Doc::Perldl' if $topic =~ /^\s*help\s*$/i;
	  if ($topic =~ /^\s*vars\s*$/i) {
	      PDLA->px((caller)[0]);
	  } elsif($topic =~ /^\s*url\s*/i) {
	      my $a = help_url();
	      if($a) {
		  print $a;
	      } else {
		  print "Hmmm. Curious: I couldn't find the HTML docs anywhere in \@INC...\n";
	      }
	  } elsif($topic =~ /^\s*www(:([^\s]+))?\s*/i) {
	      my $browser;
	      my $url = help_url();



( run in 2.435 seconds using v1.01-cache-2.11-cpan-a3c8064c92c )