App-wdq

 view release on metacpan or  search on metacpan

script/wdq  view on Meta::CPAN


if ( $OPT{man} ) {
    my $module = $OPT{color} ? 'Pod::Text::Color' : 'Pod::Text';

    # may fail if pure script installed by hand
    eval "require $module; require App::wdq";    ## no critic
    $module->new->parse_from_file( $INC{'App/wdq.pm'} // $0 );
    exit;
}

# default SPARQL endpoint
$OPT{api} //= 'https://query.wikidata.org/bigdata/namespace/wdq/sparql';

# add default prefixes by default
$OPT{'default-prefixes'} //= 1;

# include header in output
$OPT{header} //= $OPT{H} ? 0 : 1;

# limit given as single digit option
foreach ( grep { $OPT{$_} } 1 .. 9 ) {

script/wdq  view on Meta::CPAN


Ignore empty results instead of issuing warning and exit code.

=item --color|-C

By default output is colored if writing to a terminal. Disable this with
C<--no-color>, C<--monochrome>, or C<-M>. Force color with C<--color> or C<-C>.

=item --api URL

SPARQL endpoint. Default value:
C<https://query.wikidata.org/bigdata/namespace/wdq/sparql>

=item --no-mediawiki|-m

Don't query MediaWiki API to map URLs to Wikidata items.

=item --no-execute|-n

Don't execute SPARQL queries but show them in expanded form. Useful to
validate and pretty-print queries. MediaWiki API requests may be



( run in 0.283 second using v1.01-cache-2.11-cpan-b61123c0432 )