Probably could get away with just one eval (the one checking for lchown (untested):
eval( 'use POSIX qw( lchown )' ); if( defined &lchown ) { *best_chown = sub ($$$) { lchown( @_ ) }; } else { *best_chown = sub ($$$) { chown( @_ ) }; }
Update: And I don't think your prototype for chown looks right; CORE::chown is (@) . . .
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re: Detecting lchown and falling back to chown
by Fletch
in thread Detecting lchown and falling back to chown
by andy314
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |