Server IP : 111.118.215.189 / Your IP : 216.73.216.194 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/share/doc/perl-Sub-Exporter-0.986/t/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
#!/usr/bin/perl -T use strict; use warnings; =head1 TEST PURPOSE These tests check that the inherited form of a routine is the exported one. =cut use Test::More tests => 3; BEGIN { use_ok('Sub::Exporter'); } package E::Parent; use Sub::Exporter -setup => { exports => [ qw(foo) ] }; sub foo { return 1; } package E::Child; use base qw(E::Parent); sub foo { return 2; } package Test::Sub::Exporter::EPARENT; E::Parent->import('foo'); main::is(foo(), 1, "get result of parent's import"); package Test::Sub::Exporter::ECHILD; E::Child->import('foo'); main::is(foo(), 2, "get result of child's import");