sample "Class::Inspector" perl
#!/usr/local/bin/perl
use strict;use Class::Inspector;
package Test;
sub test_01 { print "test_01\n";}
sub test_02 { print "test_02\n";}
for my $m (sort grep /^test_/, @{Class::Inspector->methods('Test')}) {
Test->$m();
}
-result-
test_01
test_02
ラベル: perl
0 Comments:
コメントを投稿
<< Home