[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-Modules] Mac::Glue gone beta



At 8.28 -0400 1999.07.18, Georg Bauer wrote:
>>That you should set in your MacPerl's resource fork.  I don't want that
>>kind of code to be in Mac::Glue.  If anything, what I might consider doing
>>is using the Internet Config prefs, though.
>
>Yes, that would be exactly what I would like. So I can set my preferred
>creator for .pm's and it would be used.

Here's a patch for ExtUtils::MM_MacOS (the one in site_perl, not lib).

*** :cpan-mac-0.32:blib:lib:ExtUtils:MM_MacOS.pm	Thu Jul  8 16:06:42
1999
--- :perl:site_specific:ExtUtils:MM_MacOS.pm	Sun Jul 18 11:31:22 1999
***************
*** 1005,1015 ****
--- 1005,1028 ----

  sub convert_files {
      require Mac::Conversions;
+     require Mac::InternetConfig;
+     Mac::InternetConfig->import;
+
+     my @def = (scalar(GetICHelper('editor')) || 'ttxt', 'TEXT');
+
      my($files, $verbose) = @_;
      my $conv = Mac::Conversions->new(Remove => 1);
      foreach my $file (@$files) {
          $file = ':' . Archive::Tar::_munge_file($file);
          chmod 0666, $file or die "$file: $!";
+
+         my @info;
+         if (ref(my $map = $InternetConfigMap{$file}) eq 'ICMapEntry') {
+             @info = ($map->file_creator, $map->file_type);
+         }
+         @info = @def unless $info[0] && $info[1];
+         MacPerl::SetFileInfo(@info, $file);
+
          if (-T $file) {
              chmod 0666, $file or die $!;
              local(*FILE, $/);

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-modules-request@macperl.org