Back to top


NAME

  UpdateChecker::Data::File -- To save the contents of target to File

Back to top


SYNOPSYS

 use UpdateChecker::File;
 my $target_data =
     {
      '/etc/httpd/conf/httpd.conf' =>
        {
          location =>'/etc/httpd/conf/httpd.conf'
        },
      '/etc/httpd/conf/perl.conf' =>
        {
          location =>'/etc/httpd/conf/perl.conf'
        }
     };
 my $uc = new UpdateChecker::File(data => 'File', target_data => $target_data);
 $target_data = $uc->target_data;
 # if you want to know other function, see UpdateChecker document.

Back to top


METHODS

new
  my $check_data = new UpdateChecker::Data::File ({dir => '/home/user/.uc', target_data => {}});

It creates UpdateChecker::Data::File object. dir's value is directory which you want to save the contents of the target.

dir
 $obj->dir($dir);
 my $dir = $obj->dir();

$dir is directory to save targets' contents. Default is ``$ENV{HOME}/.uc'' as class variable. You can change default directory as below.

 UpdateChecker::Data::File->dir('/home/user/hogehoge');
escape_target_name
 $obj->escape_target_name($zero_or_one);
 my $escape_target_name = $obj->escape_target_name();

$zero_or_one is 0 or 1. Default is 1 as class variable. If this method return true, file name based on target name is escaped by CGI->escape. If this method return false, file name based on target name is not escaped by CGI->escape. You can change default value as below.

 UpdateChecker::Data::File->escape_target_name(0);

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