Question:

Which messages will be printed?

package Animal;
sub AUTOLOAD {}                                   
sub new { bless {}, shift }
package Dog;
use base 'Animal';
sub run {}
package main;
my $obj = Dog->new();
if ($obj->can('run')) {
    print "can run\n"  
}
if ($obj->can('bark')) {
    print "can bark\n"  
}

Answers:


Keywords:

© 2017 QuizBucket.org