in reply to RFC: Tying Filehandles

tie returns the tied object, so you can make your ugly syntax a bit less ugly:
my $ctrl = tie *fh, 'Tie::File::Custom', 'num.dat' or die "Unable to tie : $!"; $ctrl->LINES( 2 ); # Return 2 lines at a time $ctrl->BUFF( 100 ); # Read 100 bytes at a time since we expect sh

Replies are listed 'Best First'.
Re^2: RFC: Tying Filehandles
by Limbic~Region (Chancellor) on Mar 02, 2005 at 19:27 UTC
    Mugatu,
    Right. I offer both approaches in Tie::Hash::Sorted as well as passing the arguments in the constructor. As you can see, I don't much care for the alternative either. Thanks though!

    Cheers - L~R