in reply to Detecting lchown and falling back to chown
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Detecting lchown and falling back to chown
by andy314 (Initiate) on Feb 01, 2008 at 16:40 UTC | |
by Fletch (Bishop) on Feb 01, 2008 at 17:32 UTC |