Clownfish-CFC

 view release on metacpan or  search on metacpan

t/500-hierarchy.t  view on Meta::CPAN

        or die "Can't open '$h_path': $!";
    print $fh "#include <stdio.h>\n";    # fake content.
    close $fh or die "Can't close '$h_path': $!";
    utime( $one_second_ago, $one_second_ago, $h_path )
        or die "utime failed for '$h_path': $!";
}

my $path_to_animal_cf = $animal->get_path;
# Strawberry Perl may unpack the distribution's files as read-only.
if ( ! -w $path_to_animal_cf ) {
    chmod( 0644, $path_to_animal_cf )
        or die "chmod for '$path_to_animal_cf' failed";
}
utime( undef, undef, $path_to_animal_cf )
    or die "utime for '$path_to_animal_cf' failed";    # touch

$hierarchy->propagate_modified;

ok( $animal->get_modified, "Animal modified" );
ok( $dog->get_modified, "Parent's modification propagates to child's file" );
ok( !$util->get_modified, "modification doesn't propagate to inert class" );



( run in 0.247 second using v1.01-cache-2.11-cpan-496ff517765 )