home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-perl-addon-1.4.9-installer.exe / isChildPath.al < prev    next >
Encoding:
Text File  |  2002-11-06  |  691 b   |  28 lines

  1. # NOTE: Derived from ..\blib\lib\CGI\XMLForm\Path.pm.
  2. # Changes made here will be lost when autosplit is run again.
  3. # See AutoSplit.pm.
  4. package CGI::XMLForm::Path;
  5.  
  6. #line 102 "..\blib\lib\CGI\XMLForm\Path.pm (autosplit into ..\blib\lib\auto\CGI\XMLForm\Path\isChildPath.al)"
  7. sub isChildPath {
  8.     my $self = shift;
  9.     my $compare = shift;
  10.  
  11.     # Now compare each level of the tree, and throw away attributes.
  12.     my @a = @{$self->{_fullpath}};
  13.     my @b = @{$compare->{_fullpath}};
  14.  
  15.     if (@a >= @b) {
  16.         return 0;
  17.     }
  18.     foreach ($#a..0) {
  19.         $a[$_] =~ s/\[.*\]//;
  20.         $b[$_] =~ s/\[.*\]//;
  21.         return 0 if ($a[$_] ne $b[$_]);
  22.     }
  23.     return 1;
  24. }
  25.  
  26. # end of CGI::XMLForm::Path::isChildPath
  27. 1;
  28.