#!/usr/bin/perl use strict; use warnings; print "yes hallo" if Test->can('hallo'); print "yes test" if Test->can('test'); package Test; sub test{ 1; }