Robin Houston wrote:

> Although the best solution would (obviously) be to
> use Symbol::Approx::Sub with an appropriate matcher :-)

[simon@ns0 simon]$ cat globtest
#!/usr/bin/perl

*foo = \&UI;

UI16();
UI32();
SI402();
foo12();


sub UI () {
        print $_[0],"\n";
}

sub SI() {
        print $_[0],"\n";
}

sub AUTOLOAD
{
        my ($name) = $AUTOLOAD;
        $name =~ /^[^:]+::([^\d]+)(\d+)/ && &$1($2);
}
[simon@ns0 simon]$ perl globtest
16
32
402
12
[simon@ns0 simon]$

Reply via email to