ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent/Handle.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent/Handle.pm (file contents):
Revision 1.64 by root, Fri Jun 6 11:01:17 2008 UTC vs.
Revision 1.65 by root, Fri Jun 6 11:05:16 2008 UTC

500=cut 500=cut
501 501
502register_write_type packstring => sub { 502register_write_type packstring => sub {
503 my ($self, $format, $string) = @_; 503 my ($self, $format, $string) = @_;
504 504
505 pack "$format/a", $string 505 pack "$format/a*", $string
506}; 506};
507 507
508=item json => $array_or_hashref 508=item json => $array_or_hashref
509 509
510Encodes the given hash or array reference into a JSON object. Unless you 510Encodes the given hash or array reference into a JSON object. Unless you
556register_write_type storable => sub { 556register_write_type storable => sub {
557 my ($self, $ref) = @_; 557 my ($self, $ref) = @_;
558 558
559 require Storable; 559 require Storable;
560 560
561 pack "w/a", Storable::nfreeze ($ref) 561 pack "w/a*", Storable::nfreeze ($ref)
562}; 562};
563 563
564=back 564=back
565 565
566=item AnyEvent::Handle::register_write_type type => $coderef->($handle, @args) 566=item AnyEvent::Handle::register_write_type type => $coderef->($handle, @args)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines