/[Frey]/trunk/lib/Frey/View/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/View/JSON.pm

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

trunk/lib/Frey/JSON.pm revision 441 by dpavlin, Wed Nov 19 02:05:15 2008 UTC trunk/lib/Frey/View/JSON.pm revision 467 by dpavlin, Wed Nov 19 19:28:09 2008 UTC
# Line 1  Line 1 
1  package Frey::JSON;  package Frey::View::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 14  has data => ( Line 17  has data => (
17          required => 1,          required => 1,
18  );  );
19    
20  sub markup {  sub as_markup {
21          my ($self) = @_;          my ($self) = @_;
22          JSON->new->allow_nonref(1)->encode($self->data);          $self->content_type('application/javascript');
23            JSON->new->allow_nonref(1)->encode($self->as_data);
24  }  }
25    
26  1;  1;

Legend:
Removed from v.441  
changed lines
  Added in v.467

  ViewVC Help
Powered by ViewVC 1.1.26