text stringlengths 0 834k |
|---|
return 0; |
} |
} |
1; |
} |
if(caller) { |
return 1; |
} |
package |
PkgConfig::Version; |
use overload |
'<=>' => sub { $_[0]->cmp($_[1]) }, |
'""""' => sub { $_[0]->as_string }, |
fallback => 1; |
sub new { |
my($class, $value) = @_; |
bless [split /\./, defined $value ? $value : ''], $class; |
} |
sub clone { |
__PACKAGE__->new(shift->as_string); |
} |
sub as_string { |
my($self) = @_; |
join '.', @{ $self }; |
} |
sub cmp { |
my($self, $other) = @_; |
no warnings 'uninitialized'; |
defined($self->[0]) || defined($other->[0]) ? ($self->[0] <=> $other->[0]) || &cmp([@{$self}[1..$#$self]], [@{$other}[1..$#$other]]) : 0; |
} |
################################################################################ |
################################################################################ |
################################################################################ |
################################################################################ |
### Script-Only stuff ### |
################################################################################ |
################################################################################ |
################################################################################ |
################################################################################ |
package PkgConfig::Script; |
use strict; |
use warnings; |
use Getopt::Long qw(:config no_ignore_case); |
use Pod::Usage; |
my $print_errors = 0; |
my @ARGV_PRESERVE = @ARGV; |
my @POD_USAGE_SECTIONS = ( |
""NAME"", |
'DESCRIPTION/SCRIPT OPTIONS/USAGE', |
""DESCRIPTION/SCRIPT OPTIONS/ARGUMENTS|ENVIRONMENT"", |
""AUTHOR & COPYRIGHT"" |
); |
my @POD_USAGE_OPTIONS = ( |
-verbose => 99, |
-sections => \@POD_USAGE_SECTIONS |
); |
GetOptions( |
'libs' => \my $PrintLibs, |
'libs-only-L' => \my $PrintLibsOnlyL, |
'libs-only-l' => \my $PrintLibsOnlyl, |
'libs-only-other' => \my $PrintLibsOnlyOther, |
'list-all' => \my $ListAll, |
'static' => \my $UseStatic, |
'cflags' => \my $PrintCflags, |
'cflags-only-I' => \my $PrintCflagsOnlyI, |
'cflags-only-other' => \my $PrintCflagsOnlyOther, |
'exists' => \my $PrintExists, |
'atleast-version=s' => \my $AtLeastVersion, |
'atleast-pkgconfig-version=s' => \my $AtLeastPkgConfigVersion, |
'exact-version=s' => \my $ExactVersion, |
'max-version=s' => \my $MaxVersion, |
'silence-errors' => \my $SilenceErrors, |
'print-errors' => \my $PrintErrors, |
'errors-to-stdout' => \my $ErrToStdOut, |
'short-errors' => \my $ShortErrors, |
'define-variable=s', => \my %UserVariables, |
'print-variables' => \my $PrintVariables, |
'print-values' => \my $PrintValues, |
'variable=s', => \my $OutputVariableValue, |
'modversion' => \my $PrintVersion, |
'version', => \my $PrintAPIversion, |
'real-version' => \my $PrintRealVersion, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.