/[Frey]/trunk/lib/Frey/JSON.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey/JSON.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 447 by dpavlin, Wed Nov 19 02:05:15 2008 UTC revision 448 by dpavlin, Wed Nov 19 03:36:24 2008 UTC
# Line 1  Line 1 
1  package Frey::JSON;  package Frey::JSON;
2  use Moose;  use Moose;
3    
4    extends 'Frey';
5    with 'Frey::Web';
6    
7  =head1 DESCRIPTION  =head1 DESCRIPTION
8    
9  dump perl data as json  dump perl data as json
# Line 16  has data => ( Line 19  has data => (
19    
20  sub markup {  sub markup {
21          my ($self) = @_;          my ($self) = @_;
22            $self->content_type('application/javascript');
23          JSON->new->allow_nonref(1)->encode($self->data);          JSON->new->allow_nonref(1)->encode($self->data);
24  }  }
25    

Legend:
Removed from v.447  
changed lines
  Added in v.448

  ViewVC Help
Powered by ViewVC 1.1.26