home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / perl / dump.al < prev    next >
Encoding:
Text File  |  2003-04-30  |  624 b   |  23 lines

  1. # NOTE: Derived from blib\lib\Config\Simple.pm.
  2. # Changes made here will be lost when autosplit is run again.
  3. # See AutoSplit.pm.
  4. package Config::Simple;
  5.  
  6. #line 1402 "blib\lib\Config\Simple.pm (autosplit into blib\lib\auto\Config\Simple\dump.al)"
  7. sub dump {
  8.   my ($self, $file, $indent) = @_;
  9.  
  10.   require Data::Dumper;
  11.   my $d = new Data::Dumper([$self], [ref $self]);
  12.   $d->Indent($indent||2);
  13.   if ( defined $file ) {
  14.     sysopen(FH, $file, O_WRONLY|O_CREAT|O_TRUNC, 0666) or die $!;
  15.     print FH $d->Dump();
  16.     CORE::close(FH) or die $!;
  17.   }
  18.   return $d->Dump();
  19. }
  20.  
  21. # end of Config::Simple::dump
  22. 1;
  23.