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

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

revision 28 by dpavlin, Sun Jun 29 20:13:46 2008 UTC revision 41 by dpavlin, Mon Jun 30 20:02:14 2008 UTC
# Line 27  template 'status' => sub { Line 27  template 'status' => sub {
27    
28  sub method_link {  sub method_link {
29          my ( $pkg,$method ) = @_;          my ( $pkg,$method ) = @_;
30            my $url = "/$pkg/$method";
31            $url = $method if $method =~ m!^/!;
32          a {          a {
33                  { href is "/$pkg/$method" }                  { href is $url }
34                  outs $method                  outs $method
35          }          }
36  }  }
# Line 47  sub package_methods { Line 49  sub package_methods {
49  template 'package-methods' => sub {  template 'package-methods' => sub {
50          my ( $self, $req, $package ) = @_;          my ( $self, $req, $package ) = @_;
51          $package ||= $req->param('package');          $package ||= $req->param('package');
52          my $templates = Template::Declare->templates->{ $package } or die "no package $package\n";          my $methods = Template::Declare->templates->{ $package } or die "no package $package\n";
53          package_methods( $package, $templates );          package_methods( $package, $methods );
54  };  };
55    
56  template 'templates' => sub {  template 'templates' => sub {
# Line 67  template 'templates' => sub { Line 69  template 'templates' => sub {
69    
70  template 'classes' => sub {  template 'classes' => sub {
71          my $self = shift;          my $self = shift;
72          h1 { 'All classes in image' };          h1 { 'All packages in image' };
73          my $f = Frey->new;          my $f = Frey->new;
74          debug_dump( $f->classes );          debug_dump( $f->classes );
75  };  };
76    
77  template 'error' => sub {  template 'error' => sub {
78          my ( $self, $req, $error ) = shift;          my ( $self, $req, $error ) = @_;
79          $error ||= dump( caller(1) );          $error ||= dump( caller(1) );
80          warn "## error: $error\n";          warn "## error: $error\n";
81          pre {          pre {

Legend:
Removed from v.28  
changed lines
  Added in v.41

  ViewVC Help
Powered by ViewVC 1.1.26