my $hvp = dtest Net::Interface();
foreach (keys %{*{$hvp}}) {
print "$_\t=> ${*{$hvp}}{$_}\n";
}
print 'the GV ',${*{$hvp}},"\n";
print 'the Ref ',ref $hvp,"\n";
print "arref ",ref ${*{$hvp}}{array},"\n";
# can be expressed as ${*{$hvp}}{array}->[0] or as below
print "ARVAL ",*{$hvp}->{array}->[0],"\n";
use Devel::Peek;
Dump($hvp);
print "\n\n";
Dump(${*{$hvp}}{array});
use Devel::Peek; use Data::Dumper;
my @ifaces = interfaces Net::Interface();
foreach my $hvp (@ifaces) { Dump($hvp); print Dumper($hvp),"\n"; }
my $hvp = Net::Interface->interfaces();
my $hvp = Net::Interface->dtest2();
use Devel::Peek; use Data::Dumper;
print "HVP\n";
Dump($hvp);
# print "\nthe PV ptr\n";
# print Dump(\${*{$hvp}});
# print "\nthe PV itself\n";
# print Dump(${*{$hvp}});
# print "\nthe HASHref\n";
# print Dump(\%{*{$hvp}});
# print "\n";
for(0..1000000) { print $_,"\n" unless $_ % 1000; my $hvp= interfaces Net::Interface(); # my $hvp = dtest Net::Interface(); }
use Devel::Peek; use Data::Dumper;
my $hvp = new Net::Interface('eth0');
Dump($hvp); print "\n\n"; print Dumper($hvp),"\n";
my @all = Net::Interface->interfaces();
print $all[0]->name,"\n";
my @allnames = "@all"; print @allnames,"\n";
use Data::Dumper; my $sym = net_symbols(); print Dumper($sym);