Skip to content

Commit

Permalink
add "x" command to perldl/pdl2 that Data::Dumper-s its args
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Oct 3, 2024
1 parent 8d9add0 commit 21dc615
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- split Libtmp/Minuit out to separate PDL::Minuit distro
- Transform::Proj4 add NoPthread as using non-thread-safe API
- Transform::Proj4 use Alien::proj better for build (#499) - thanks @shawnlaffan
- perldl/pdl2 now have "x" command that Data::Dumper-s argument

2.093 2024-09-29
- PDL.set_datatype now doesn't physicalise input, PDL.convert_type does
Expand Down
10 changes: 10 additions & 0 deletions Perldl2/Profile/Perldl2.pm
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,16 @@ sub apply_profile {
}
} );

$repl->eval( q{
sub x {
require Data::Dumper;
local $Data::Dumper::Indent = 1;
local $Data::Dumper::Indent = 1;
local $Data::Dumper::Terse = 1;
print Data::Dumper::Dumper(@_);
}
} );

$repl->eval( q{
use PDL::Demos;
sub demo {
Expand Down
8 changes: 8 additions & 0 deletions perldl
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,14 @@ sub gv {
$output; # return just in case
}

sub x {
require Data::Dumper;
local $Data::Dumper::Indent = 1;
local $Data::Dumper::Indent = 1;
local $Data::Dumper::Terse = 1;
print Data::Dumper::Dumper(@_);
}

sub page {
$PERLDL::PAGE = (defined $_[0] ? $_[0] : 1);
}
Expand Down

0 comments on commit 21dc615

Please sign in to comment.