InfoSys-FreeDB

 view release on metacpan or  search on metacpan

gen/attr-InfoSys_FreeDB.pl  view on Meta::CPAN

\=item B<C<client_host>>

The hostname of the client. Defaults to C<&Sys::Hostname::hostname()>.

\=item B<C<client_name>>

Mandatory option to name the connecting client software.

\=item B<C<client_user>>

The user name of the client. Defaults to C<scalar( getpwuid(\$E<gt>) )>.

\=item B<C<client_version>>

Mandatory option with the client software version string.

\=item B<C<freedb_cgi>>*

The FreeDB C<cgi> to use. Defaults to C<~cddb/cddb.cgi>.

\=item B<C<freedb_host>>

gen/attr-InfoSys_FreeDB.pl  view on Meta::CPAN

    my $self = shift;
    my $opt = defined($_[0]) ? shift : {};

    # Check $opt
    ref($opt) eq 'HASH' ||
        throw Error::Simple("ERROR: InfoSys::FreeDB::create_connection, first argument must be 'HASH' reference.");

    # Set default values for $opt
    $opt->{client_host} = &Sys::Hostname::hostname()
        if (! $opt->{client_host} );
    $opt->{client_user} = scalar( getpwuid($>) )
        if (! $opt->{client_user} );
    $opt->{freedb_host} = 'freedb.freedb.org'
        if (! $opt->{freedb_host} );

    # Set default value to protocol
    $opt->{protocol} = 'HTTP' if ( ! $opt->{protocol} );

    # Select the correct connection class
    my $conn = undef;
    if ( $opt->{protocol} eq 'HTTP' ) {

lib/InfoSys/FreeDB.pm  view on Meta::CPAN

=item B<C<client_host>>

The hostname of the client. Defaults to C<&Sys::Hostname::hostname()>.

=item B<C<client_name>>

Mandatory option to name the connecting client software.

=item B<C<client_user>>

The user name of the client. Defaults to C<scalar( getpwuid($E<gt>) )>.

=item B<C<client_version>>

Mandatory option with the client software version string.

=item B<C<freedb_cgi>>*

The FreeDB C<cgi> to use. Defaults to C<~cddb/cddb.cgi>.

=item B<C<freedb_host>>

lib/InfoSys/FreeDB.pm  view on Meta::CPAN

    my $self = shift;
    my $opt = defined($_[0]) ? shift : {};

    # Check $opt
    ref($opt) eq 'HASH' ||
        throw Error::Simple("ERROR: InfoSys::FreeDB::create_connection, first argument must be 'HASH' reference.");

    # Set default values for $opt
    $opt->{client_host} = &Sys::Hostname::hostname()
        if (! $opt->{client_host} );
    $opt->{client_user} = scalar( getpwuid($>) )
        if (! $opt->{client_user} );
    $opt->{freedb_host} = 'freedb.freedb.org'
        if (! $opt->{freedb_host} );

    # Set default value to protocol
    $opt->{protocol} = 'HTTP' if ( ! $opt->{protocol} );

    # Select the correct connection class
    my $conn = undef;
    if ( $opt->{protocol} eq 'HTTP' ) {



( run in 0.355 second using v1.01-cache-2.11-cpan-8d75d55dd25 )