At 23:31 Uhr +0100 14.10.2001, Phil Dobbin wrote:
>Hi.
>
>Sorry if this has made it through before but my server is playing up.
>
>Have just installed 5.6.1b1 via web install and all .pm files have Shuck creator
>codes (�uck) instead of McPL. So whole lib., apart from a few .pl files, are Shuck
>docs.
>
>Can anybody advise of next step or any workround?
>
>Regards,
>
>Phil.
>
Phil,
I don't know what happened. Maybe you should file a bug report on SourceForge, see
http://sf.net/tracker/?group_id=7940&atid=107940
Assuming that you have a working MacPerl, here's a script that recurses through
directories and sets the creator of text files to 'McPL' (or whatever you want). Set
the starting $topdir accordingly.
______
#! perl -w
#
# SetFile.pl
#
use File::Find;
$topdir = "MacintoshHD:macperl_src:macperl:site_perl:"; # adjust
find (\&wanted, $topdir);
print "\nDone.\n";
sub wanted {
# print "SetFileInfo for $_ (in dir $File::Find::dir)\n";
if (-f $_) { # $_ is a file
my ($creator, $type) = MacPerl::GetFileInfo($_);
if ($type eq 'TEXT') {
# set creator of text-files to 'McPL' (MacPerl)
# or 'MPS ' (MPW)
MacPerl::SetFileInfo('McPL', 'TEXT', $_);
}
}
}
__END__
HTH.
Best regards,
--Thomas
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com