At 11.53 +0900 2000.03.16, Tetsuro Kurita wrote: >I met a strange behaivor of get method of handle class object when I was >writing a script to manupulate aete resouce. > >For example, could you see a following script. This script read aete resouce >of Encode URL OSAX. > >use Mac::Memory;use Mac::Resources; > >$target = 'Macintosh HD:Encode URL ?:Encode URL'; > >$RF = OpenResFile($target);$temp_handle = Get1Resource('aete', 0); > >$aete_handle = new Handle $temp_handle->get;CloseResFile($RF);print >$aete_handle->get(29, 0);ReleaseResource($aete_handle) > >The output to STDOUT is '[syso'. 0 length to read data is given to get >method of handle class. But 5 byte data is returned.When 0 length is given, >get method of handle class sometimes returns unexpected results. Does 0 >length have special meaning in get method ? It is a bug. * $Log: Memory.xs,v $ * Revision 1.4 1999/06/04 16:01:31 pudge * Fixed Handle::get again. Added version number (1.20). * * Revision 1.3 1999/06/03 19:27:41 pudge * Fixed bug in Handle::get, for returning data when handle size is 0. The current version of this is only available online in the cpan-mac distribution, which is available on CPAN in my user directory (though it will be in the next distribution, whenever that is :). http://www.perl.com/CPAN/authors/id/CNANDOR/ -- 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-request@macperl.org