Changeset 19

Show
Ignore:
Timestamp:
11/07/00 14:33:03
Author:
miyagawa
Message:

update README

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Mac-Macbinary/trunk/README

    r16 r19  
    11NAME 
    2     Mac::Macbinary - Macbinary Handler 
     2    Mac::Macbinary - Decodes Macbinary files. 
    33 
    44SYNOPSIS 
     
    4040          $mb = new Mac::Macbinary "path/to/file"; 
    4141 
     42        `new()' throws an exception "Can't read blahblah" if the given 
     43        argument to the constructor is neither a valid filehandle nor an 
     44        existing file. 
     45 
    4246  Instance Method 
    4347 
     
    6973          char mdate[4]; 
    7074 
     75EXAMPLE 
     76    Some versions of MSIE for Macintosh sends their local files as Macbinary 
     77    format via forms. You can decode them in a following way: 
     78 
     79      use CGI; 
     80      use Mac::Macbinary; 
     81 
     82      $q = new CGI; 
     83      $filename = $q->param('uploaded_file'); 
     84      $type = $q->uploadInfo($filename)->{'Content-Type'}; 
     85      
     86      if ($type eq 'application/x-macbinary') { 
     87          $mb = Mac::Macbinary->new($q->upload('uploaded_file'); 
     88          # now, you can get data via $mb->data; 
     89      }  
     90 
     91TODO 
     92    should add `is_macbinary()', to detect if a file is a Macbinary file or 
     93    not. 
     94 
    7195AUTHOR 
    72     Tatsuhiko Miyagawa <miyagawa@edge.co.jp> Originally written by Dan Kogai 
    73     <dankogai@dan.co.jp> 
     96    Tatsuhiko Miyagawa <miyagawa@edge.co.jp> 
     97 
     98ACKNOWLEDGEMENT 
     99    Macbinary.pm is originally written by Dan Kogai <dankogai@dan.co.jp>. 
    74100 
    75101SEE ALSO