Show
Ignore:
Timestamp:
08/12/08 16:11:22 (5 years ago)
Author:
lopnor
Message:

lang/perl/Google-Chart-DBIC: fix the way to set default, maybe

Location:
lang/perl/Google-Chart-DBIC/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Google-Chart-DBIC/trunk/lib/Google/Chart/DBIC.pm

    r17504 r17517  
    1010    is => 'rw', 
    1111    required => 1, 
    12     default => '400x400', 
     12    default => sub {'400x400'}, 
    1313); 
    1414 
     
    1616    is => 'rw', 
    1717    required => 1, 
    18     default => 'line', 
     18    default => sub {'line'}, 
    1919); 
    2020 
  • lang/perl/Google-Chart-DBIC/trunk/t/01_usage.t

    r17504 r17517  
    2525    my $chart = Google::Chart::DBIC->new({ 
    2626            resultset => \@list, 
    27             size => '500x300', 
    28             type => 'line', 
    29         }); 
    30  
    31     isa_ok $chart, 'Google::Chart::DBIC'; 
    32  
    33     my $uri = URI->new($chart->as_uri); 
    34     diag $uri; 
    35     ok ($uri); 
    36     my %h = $uri->query_form; 
    37     is $h{chs}, '500x300'; 
     27        }); 
     28 
     29    isa_ok $chart, 'Google::Chart::DBIC'; 
     30 
     31    my $uri = URI->new($chart->as_uri); 
     32    diag $uri; 
     33    ok ($uri); 
     34    my %h = $uri->query_form; 
     35    is $h{chs}, '400x400'; 
    3836    is $h{cht}, 'lc'; 
    3937}