Re: AUTOLOAD speed

2001-01-19 Thread Leon Brocard
Simon Wistow sent the following bits through the ether: And thought ... would it be big performance hit if I did this through AUTOLOAD. Right, that does it. The next two talks I'm gonna do will be "Introduction to Benchmarking with Perl and the Bechmark module" and "Introduction to Testing

Re: AUTOLOAD speed

2001-01-19 Thread Dave Cross
At Fri, 19 Jan 2001 16:02:23 +, Simon Wistow [EMAIL PROTECTED] wrote: I was just typing this ... # Unsigned int 8bit sub ui8() { my $self; = shift; $self-UI8()} # Unsigned int 16bit sub ui16() { my $self; = shift; $self-UI16() } sub Word() { my $self; = shift;

Re: AUTOLOAD speed

2001-01-19 Thread Simon Wistow
Dave Cross wrote: *ui8 = \U18; *ui16 = \UI16; *Word = \UI16; *word = \UI16; That's the ticket. Brain still fried today.

Re: AUTOLOAD speed

2001-01-19 Thread Simon Wistow
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