Lines Matching refs:opts

52 my @opts   = qw( get_options );
59 @EXPORT = ( @utils, @opts, @vars, @print, @name, @file, @io, @exec, @string );
90 my $opts = shift( @_ ); # Reference to hash containing real options and their values.
102 foreach my $opt ( keys( %$opts ) ) { # For each real option...
105 delete( $opts->{ $opt } ); # And delete original option.
145 my %opts = @_; # Temporary use %opts for parameters of `validate' subroutine.
146 my $params = $opts{ params };
147 my $caller = ( $opts{ caller } or 0 ) + 1;
148 my $spec = $opts{ spec };
149 undef( %opts ); # Ok, Clean %opts, now we will collect result of the subroutine.
201 $opts{ $opt } = $val;
206 if ( not defined( $opts{ $opt } ) and exists( $spec->{ $opt }->{ default } ) ) {
207 $opts{ $opt } = $spec->{ $opt }->{ default };
216 return %opts;
716 my %opts = @_;
718 check_opts( %opts, [ qw( -all -dirs -exec ) ] );
719 if ( $opts{ -all } and not wantarray() ) {
723 if ( not defined( $opts{ -exec } ) ) {
724 $opts{ -exec } = 1;
727 my $dirs = ( exists( $opts{ -dirs } ) ? $opts{ -dirs } : [ File::Spec->path() ] );
731 if ( $^O eq "MSWin32" and $opts{ -exec } ) {
746 if ( not $opts{ -exec } or -x $path or $^O eq "cygwin" ) {
748 if ( not $opts{ -all } ) {
764 if ( $opts{ -all } ) {
891 my %opts =
909 File::Path::mkpath( $dir, 0, $opts{ mode } );
947 my %opts = @_;
958 if ( $opts{ -overwrite } ) {
994 my %opts = @_;
1005 if ( $opts{ -overwrite } ) {
1132 my %opts = @_;
1199 my %opts = @_;
1210 if ( $opts{ -overwrite } ) {
1238 my %opts = @_;
1241 check_opts( %opts, [ qw( -overwrite ) ] );
1251 if ( $opts{ -overwrite } ) {
1376 my %opts = @_; # Options.
1385 check_opts( %opts, [ @binopts, @txtopts ] );
1386 if ( $opts{ -binary } ) {
1387 check_opts( %opts, [ @binopts ], "these options cannot be used with -binary" );
1389 check_opts( %opts, [ @txtopts ], "these options cannot be used without -binary" );
1391 if ( not exists( $opts{ -error } ) ) {
1392 $opts{ -error } = "error";
1394 if ( $opts{ -error } eq "warning" ) {
1396 } elsif( $opts{ -error } eq "ignore" ) {
1398 } elsif ( ref( $opts{ -error } ) eq "ARRAY" ) {
1399 $error = sub { push( @{ $opts{ -error } }, $_[ 0 ] ); };
1407 if ( get_ext( $file ) eq ".gz" and not $opts{ -binary } ) {
1417 if ( $opts{ -binary } ) {
1420 if ( exists( $opts{ -bulk } ) ) {
1421 ${ $opts{ -bulk } } = $handle->getline();
1426 if ( defined( $opts{ -layer } ) ) {
1427 binmode( $handle, $opts{ -layer } );
1431 if ( defined( $opts{ -layer } ) and $opts{ -layer } eq ":utf8" ) {
1440 if ( $opts{ -binary } and exists( $opts{ -bulk } ) ) {
1441 ${ $opts{ -bulk } } = "";
1444 if ( $opts{ -binary } ) {
1445 if ( exists( $opts{ -bulk } ) ) {
1454 if ( not $opts{ -keep_trailing_space } ) {
1457 if ( $opts{ -chomp } ) {
1525 my %opts = @_; # Options.
1530 check_opts( %opts, [ qw( -append -backup -binary -layer ) ] );
1532 my $mode = $opts{ -append } ? "a": "w";
1538 if ( $opts{ -backup } and ( -f $name ) ) {
1544 if ( $opts{ -binary } ) {
1546 } elsif ( $opts{ -layer } ) {
1547 binmode( $handle, $opts{ -layer } );
1552 if ( not $opts{ -binary } and ( substr( $bulk, -1 ) ne "\n" ) ) {
1559 if ( not $opts{ -binary } and ( substr( $$bulk, -1 ) ne "\n" ) ) {
1567 if ( not $opts{ -binary } and ( substr( $line, -1 ) ne "\n" ) ) {
1842 my %opts = @_;
1845 check_opts( %opts, [ qw( -stdin -stdout -stderr -append -ignore_status -ignore_signal ) ] );
1861 if ( exists( $opts{ "-$stream" } ) ) {
1862 if ( ref( $opts{ "-$stream" } ) !~ m/\A(|SCALAR|ARRAY)\z/ ) {
1865 $streams->{ $stream }->{ redir } = $opts{ "-$stream" };
1867 if ( $opts{ -append } and ( $streams->{ $stream }->{ mode } ) eq ">" ) {
1897 if ( not $opts{ -ignore_signal } ) {
1903 if ( not $opts{ -ignore_signal } ) {
1909 if ( not $opts{ -ignore_status } ) {
1933 my %opts = @_;
1936 check_opts( %opts, [ qw( -chomp ) ] );
1940 if ( $opts{ -chomp } ) {