OpenInteract2::Manage::Website::UpdatePackageFromWebsite - Managment task
#!/usr/bin/perl use strict; use OpenInteract2::Manage; my $website_dir = '/home/httpd/mysite'; my $package_dir = '/home/superman/work/mypackage'; my $package = 'mypackage'; my $changes = 'More changes to templates'; my $task = OpenInteract2::Manage->new( 'update_package', { website_dir => $website_dir, package_dir => $package_dir, package => $package, changelog => $changes } ); my @status = $task->execute; foreach my $s ( @status ) { my $ok_label = ( $s->{is_ok} eq 'yes' ) ? 'OK' : 'NOT OK'; my $default_label = ( $s->{is_default} eq 'yes' ) ? ' (default) ' : ''; print "Status OK? $s->{is_ok}\n", "$s->{message}\n", "($s->{updated} updated) ($s->{removed} removed) ", "($s->{skipped} skipped)\n"; }
In addition to website_dir required by all OpenInteract2::Manage::Website tasks, we also require:
website_dir
Name of package you wish to synchronize
Directory of developement copy of package. Files here will be modified if they do not match files in the website copy.
I will write this version into your development package 'Changes' file. If unspecified I will increment the most recent website package version by 0.01 and use that.
I will write this message into your development package 'Changes' file, associated with the new version written.
In addition to the standard entries Each status hashref includes:
Message with files updated
Message with files removed
Message with files skipped
Copyright (C) 2004-2005 Chris Winters. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Chris Winters, <chris@cwinters.com>
To install OpenInteract2::URL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OpenInteract2::URL
CPAN shell
perl -MCPAN -e shell install OpenInteract2::URL
For more information on module installation, please visit the detailed CPAN module installation guide.