Changeset 706

Show
Ignore:
Timestamp:
08/05/02 23:58:50
Author:
miyagawa
Message:

add some options

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • HTML-XSSLint/trunk/bin/xsslint

    r702 r706  
    77# default 
    88my %options = ( 
    9     'cookie' => 1, 
     9    'no-cookie' => 0, 
     10    'user-agent' => "xsslint/$HTML::XSSLint::VERSION", 
    1011); 
    1112 
    12 GetOptions(\%options, "cookie"); 
     13GetOptions(\%options, "no-cookie", "user-agent=s"); 
    1314do_task(\%options, @ARGV); 
    1415 
     
    2223    my $options = shift; 
    2324    my $agent = HTML::XSSLint->new; 
    24     if ($options->{cookie}) { 
     25    unless ($options->{'no-cookie'}) { 
    2526        my $cookie_jar = HTTP::Cookies->new; 
    2627        $agent->cookie_jar($cookie_jar); 
    2728    } 
    28     $agent->agent("xsslint/$HTML::XSSLint::VERSION"); 
     29    $agent->agent($options->{'user-agent'}); 
    2930    return $agent; 
    3031} 
     
    5758=head1 SYNOPSIS 
    5859 
    59   xsslint URL [, URL ...] 
     60  xsslint [options] URL [, URL ...] 
    6061 
    6162=head1 DESCRIPTION 
     
    7071=over 4 
    7172 
    72 =item --cookie 
     73=item --no-cookie 
    7374 
    74 This option enables C<xsslint> to accept HTTP-Cookies. default is true. 
     75This option disables C<xsslint> to accept HTTP-Cookies. Cookie is 
     76enabled by default. 
     77 
     78=item --user-agent=STRING 
     79 
     80This option changes User-Agent string of C<xsslint>. default is 
     81C<xsslint/$VERSION>. 
    7582 
    7683=back