Back to top


NAME

 UpdateChecker::Any -- to check anything whether updated or not from previous check.

Back to top


SYNOPSIS

 # create UpdateChecker::Any object
 $uc = new UpdateChecker::Any
  (
   {
    data => 'File',
    dir  => '/tmp',
   },
   load => ['File','Web','Command', 'RemoteFile'],
   arg => { Web => { timeout => 10 } }
  );
 # Set target
 $uc->target('File', '/home/user/test_data');

Back to top


CONSTRUCTOR

new
 $uc = new UpdateChecker::Any
          (
             { data => $store, %data_option },
             load => \@load_modules,
             arg =>{ $load_module => \%option}
          );

$store is for example 'File', 'Storable' etc. If it is 'File', it means to use UpdateChecker::Data::File. %data_option is passed to modules which you choose as $store. @load_modules is UpdateChecker's sub class list which you will use. arg take hash ref which key is module name in @load_modules, this value is option to be passed to the module.

Back to top


METHODS

target
 $uc->target($type, $target_location, $target_name);
 $uc->target($type, $target_location);
 $target_name = $uc->target;

$type is the part of name of UpdateChecker subclass, for example, 'Web', 'File' etc. With no arguments, it returns target name if target is set.

You can pass only target_name. It is as same as check_target.

 $uc->target($target_name);

In this case, type is specified by $uc->target_type($target_name).

target_type
 $type = $uc->target_type;
 $type = $uc->target_type($target_name);
 $type = $uc->target_type($target_name, $type);

It returns the value which is passed target as first argument. For example, 'Web', 'File' etc.

loaded
 @type = $uc->loaded;

It returns the part of name of the loaded UpdateChecker subclasses, for example, 'Web', 'File' etc.

Back to top


SEE ALSO

 UpdateChecker
 UpdateChecker::Data

Back to top


AUTHOR

 Ktat <ktat.is at gmail.com>

Back to top


COPYRIGHT

 Copyright 2003 by Kato Atsushi <ktat.is at gmail.com>.
 This program is free software; you can redistribute it
 and/or modify it under the same terms as Perl itself.
 See http://www.perl.com/perl/misc/Artistic.html

Back to top