| Win32-SqlServer-DTS documentation | Contained in the Win32-SqlServer-DTS distribution. |
Win32::SqlServer::DTS::Assignment::Destination::Package - a subclass of Win32::SqlServer::DTS::Assignment::Destination for a package
use warnings;
use strict;
use Win32::SqlServer::DTS::Application;
my $xml = XML::Simple->new();
my $config = $xml->XMLin('test-config.xml');
my $app = Win32::SqlServer::DTS::Application->new($config->{credential});
my $package =
$app->get_db_package(
{ id => '', version_id => '', name => $config->{package}, package_password => '' } );
my $iterator = $package->get_dynamic_props();
while ( my $dyn_prop = $iterator->() ) {
my $assign_iterator = $dyn_props->get_assignments();
while ( my $assignment = $assign_iterator->() ) {
my $dest = $assignment->get_destination();
# checking all properties of the Package being handled by Dynamic Properties task
if ( $dest->changes('Package') ) {
print $dest->get_string(), "\n";
}
}
}
Win32::SqlServer::DTS::Assignment::Destination::Package is a subclass of Win32::SqlServer::DTS::Assignment::Destination and represents the
assignment destination of DTS package own properties.
The string returned by the get_string method has this format:
'Properties';name of the package property.
Nothing.
initialize method sets the destination attribute as the DTS Package property name.
perldoc.perldoc.Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org>
Copyright (C) 2007 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.
| Win32-SqlServer-DTS documentation | Contained in the Win32-SqlServer-DTS distribution. |
package Win32::SqlServer::DTS::Assignment::Destination::Package;
use 5.008008; use strict; use warnings; use base qw(Win32::SqlServer::DTS::Assignment::Destination); use Carp qw(confess); our $VERSION = '0.01';
sub initialize { my $self = shift; $self->{destination} = ( split( /;/, $self->get_string() ) )[1]; confess "'destination' attribute cannot be undefined\n" unless ( defined( $self->{destination} ) ); } 1; __END__