Alceu Rodrigues de Freitas Junior > Win32-SqlServer-DTS > Win32::SqlServer::DTS::Application

Download:
Win32-SqlServer-DTS-0.10.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Win32::SqlServer::DTS::Application - a Perl class to emulate Microsoft SQL Server 2000 DTS Application object

SYNOPSIS ^

    use Win32::SqlServer::DTS::Application;

    my $app = Win32::SqlServer::DTS::Application->new( 
               { 
                   server                 => $server, 
                   user                   => $user, 
                   password               => $password, 
                   use_trusted_connection => 0 
               }
    );

    # fetchs a list of packages
    my @list = qw( LoadData ChangeData ExportData);

    foreach my $name ( @list ) {

        my $package = $self->get_db_package( { name => $name } ) );
        print $package->to_string;

    }

DESCRIPTION ^

This Perl class represents the Application object from the MS SQL Server 2000 API. Before fetching any package from a server one must instantiate a Win32::SqlServer::DTS::Application object that will provide methods to fetch packages without having to provide autentication each time.

EXPORT

None by default.

METHODS

new

Instantiate a new object from Win32::SqlServer::DTS::Application class. The expected parameter is a hash reference with the following keys:

See SYNOPSIS for an example.

get_db_package

Fetchs a single package from a MS SQL server and returns a respective Win32::SqlServer::DTS::Package object. Expects a hash reference as a parameter, having the following keys defined:

get_db_package_regex

Expect an regular expression as a parameter. The regular expression is case sensitive.

Returns a Win32::SqlServer::DTS::Package object which name matches the regular expression passed as an argument. Only one object is returned (the first one in a sorted list) even if there are more packages names that matches.

regex_pkgs_names

Expect an string, as regular expression, as a parameter. The parameter is case insensitive and the string is compiled internally in the method, so there is not need to use qr or something like that to increase performance.

Returns an array reference with all the packages names that matched the regular expression passed as an argument.

list_pkgs_names

Returns an array reference with all the packages names available in the database of the MS SQL Server. The items in the array are sorted for convenience.

CAVEATS ^

Several methods from MS SQL Server DTS Application class were not implemented, specially those available in PackageSQLServer and PackageRepository classes.

SEE ALSO ^

AUTHOR ^

Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright (C) 2006 by Alceu Rodrigues de Freitas Junior

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: