in reply to How to get the name of an aliased function

One way could be to use closures. Here's an example snippet (untested):

for my $name (qw(sub1 sub2 sub3)) { my $n = $name; # it is important to declare a new scalar for each +subroutine you create *{$name} = sub { MainSub("sub1"); }; }