App-Info

 view release on metacpan or  search on metacpan

lib/App/Info/Lib/OSSPUUID.pm  view on Meta::CPAN


*uuid = \&executable;

##############################################################################

=head3 bin_dir

  my $bin_dir = $uuid->bin_dir;

Returns the OSSP UUID binary directory path. App::Info::Lib::OSSPUUID gathers
the path from the system call C<`uuid-config --bindir`>.

B<Events:>

=over 4

=item info

Executing `uuid-config --bindir`

=item error

Cannot find bin directory

=item unknown

Enter a valid OSSP UUID bin directory

=back

lib/App/Info/Lib/OSSPUUID.pm  view on Meta::CPAN

=cut

# This code reference is used by bin_dir(), lib_dir(), and so_lib_dir() to
# validate a directory entered by the user.
my $is_dir = sub { -d };

sub bin_dir {
    my $self = shift;
    return unless $self->{uuid_config};
    unless (exists $self->{bin_dir} ) {
        if (my $dir = $get_data->($self, '--bindir')) {
            $self->{bin_dir} = $dir;
        } else {
            # Handle an unknown value.
            $self->error("Cannot find bin directory");
            $self->{bin_dir} = $self->unknown(
                key      => 'OSSP UUID bin dir',
                callback => $is_dir
            );
        }
    }

lib/App/Info/RDBMS/PostgreSQL.pm  view on Meta::CPAN


*executable = \&postgres;

##############################################################################

=head3 bin_dir

  my $bin_dir = $pg->bin_dir;

Returns the PostgreSQL binary directory path. App::Info::RDBMS::PostgreSQL
gathers the path from the system call C<`pg_config --bindir`>.

B<Events:>

=over 4

=item info

Executing `pg_config --bindir`

=item error

Cannot find bin directory

=item unknown

Enter a valid PostgreSQL bin directory

=back

lib/App/Info/RDBMS/PostgreSQL.pm  view on Meta::CPAN

=cut

# This code reference is used by bin_dir(), lib_dir(), and so_lib_dir() to
# validate a directory entered by the user.
my $is_dir = sub { -d };

sub bin_dir {
    my $self = shift;
    return unless $self->{pg_config};
    unless (exists $self->{bin_dir} ) {
        if (my $dir = $get_data->($self, '--bindir')) {
            $self->{bin_dir} = $dir;
        } else {
            # Handle an unknown value.
            $self->error("Cannot find bin directory");
            $self->{bin_dir} = $self->unknown( key      => 'postgres bin dir',
                                               callback => $is_dir)
        }
    }

    return $self->{bin_dir};

t/bin/pg_config  view on Meta::CPAN

#!/usr/bin/perl -w

use File::Spec::Functions;
my $bin_dir = catdir qw(t scripts);
$bin_dir = catdir(qw(t bin)) unless -d $bin_dir;

if ($ARGV[0] eq '--version') {
    print "PostgreSQL 8.0.0\n";
} elsif ($ARGV[0] eq '--bindir') {
    print "$bin_dir\n";
} elsif ($ARGV[0] eq '--includedir') {
    print "t/testinc\n";
} elsif ($ARGV[0] eq '--libdir' || $ARGV[0] eq '--pkglibdir') {
    print "t/testlib\n";
} elsif ($ARGV[0] eq '--configure') {
    print "\n";
}

t/bin/uuid-config  view on Meta::CPAN

#!/usr/bin/perl -w

use File::Spec::Functions;
my $bin_dir = catdir qw(t scripts);
$bin_dir    = catdir(qw(t bin)) unless -d $bin_dir;

if ($ARGV[0] eq '--version') {
    print "OSSP uuid 1.3.0 (02-Sep-2005)\n";
} elsif ($ARGV[0] eq '--bindir') {
    print "$bin_dir\n";
} elsif ($ARGV[0] eq '--includedir') {
    print "t/testinc\n";
} elsif ($ARGV[0] eq '--libdir') {
    print "t/testlib\n";
} elsif ($ARGV[0] eq '--cflags') {
    print "-I/usr/local/include\n";
} elsif ($ARGV[0] eq '--ldflags') {
    print "-L/usr/local/lib\n";
}

t/postgres_info.t  view on Meta::CPAN

    # Check patch version.
    ok( $pg = App::Info::RDBMS::PostgreSQL->new( on_info => $info ),
        "Got Object 5");
    $info->message; # Throw away constructor message.
    $pg->patch_version;
    like($info->message, qr/^Executing `".*pg_config(?:[.]exe)?" --version`$/,
        "Check patch info" );

    # Check dir methods.
    $pg->bin_dir;
    like( $info->message, qr/^Executing `".*pg_config(?:[.]exe)?" --bindir`$/,
          "Check bin info" );
    $pg->inc_dir;
    like( $info->message, qr/^Executing `".*pg_config(?:[.]exe)?" --includedir`$/,
        "Check inc info" );
    $pg->lib_dir;
    like( $info->message, qr/^Executing `".*pg_config(?:[.]exe)?" --libdir`$/,
          "Check lib info" );
    $pg->so_lib_dir;
    like( $info->message, qr/^Executing `".*pg_config(?:[.]exe)?" --pkglibdir`$/,
        "Check so lib info" );

t/scripts/pg_config  view on Meta::CPAN


eval 'exec /usr/local/bin/perl -w -S $0 ${1+"$@"}'
    if 0; # not running under some shell

use File::Spec::Functions;
my $bin_dir = catdir qw(t scripts);
$bin_dir = catdir(qw(t bin)) unless -d $bin_dir;

if ($ARGV[0] eq '--version') {
    print "PostgreSQL 8.0.0\n";
} elsif ($ARGV[0] eq '--bindir') {
    print "$bin_dir\n";
} elsif ($ARGV[0] eq '--includedir') {
    print "t/testinc\n";
} elsif ($ARGV[0] eq '--libdir' || $ARGV[0] eq '--pkglibdir') {
    print "t/testlib\n";
} elsif ($ARGV[0] eq '--configure') {
    print "\n";
}

t/scripts/uuid-config  view on Meta::CPAN


eval 'exec /usr/local/bin/perl -w -S $0 ${1+"$@"}'
    if 0; # not running under some shell

use File::Spec::Functions;
my $bin_dir = catdir qw(t scripts);
$bin_dir    = catdir(qw(t bin)) unless -d $bin_dir;

if ($ARGV[0] eq '--version') {
    print "OSSP uuid 1.3.0 (02-Sep-2005)\n";
} elsif ($ARGV[0] eq '--bindir') {
    print "$bin_dir\n";
} elsif ($ARGV[0] eq '--includedir') {
    print "t/testinc\n";
} elsif ($ARGV[0] eq '--libdir') {
    print "t/testlib\n";
} elsif ($ARGV[0] eq '--cflags') {
    print "-I/usr/local/include\n";
} elsif ($ARGV[0] eq '--ldflags') {
    print "-L/usr/local/lib\n";
}

t/uuid_info.t  view on Meta::CPAN

    # Check patch version.
    ok( $uuid = App::Info::Lib::OSSPUUID->new( on_info => $info ),
        "Got Object 5");
    $info->message; # Throw away constructor message.
    $uuid->patch_version;
    like($info->message, qr/^Executing `".*uuid-config$ext" --version`$/,
        "Check patch info" );

    # Check dir methods.
    $uuid->bin_dir;
    like( $info->message, qr/^Executing `".*uuid-config$ext" --bindir`$/,
          "Check bin info" );
    $uuid->inc_dir;
    like( $info->message, qr/^Executing `".*uuid-config$ext" --includedir`$/,
        "Check inc info" );
    $uuid->lib_dir;
    like( $info->message, qr/^Executing `".*uuid-config$ext" --libdir`$/,
          "Check lib info" );
    $uuid->cflags;

    # Check configure info.



( run in 3.047 seconds using v1.01-cache-2.11-cpan-2398b32b56e )