Changeset 309


Ignore:
Timestamp:
May 25, 2006, 4:01:46 PM (14 years ago)
Author:
nick
Message:

Start to fix the indenting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki-toolkit/trunk/lib/Wiki/Toolkit/Feed/RSS.pm

    r308 r309  
    1616sub new
    1717{
    18   my $class = shift;
    19   my $self  = {};
    20   bless $self, $class;
    21 
    22   my %args = @_;
    23   my $wiki = $args{wiki};
    24 
    25   unless ($wiki && UNIVERSAL::isa($wiki, 'Wiki::Toolkit'))
    26   {
    27     croak 'No Wiki::Toolkit object supplied';
    28   }
     18    my $class = shift;
     19    my $self  = {};
     20    bless $self, $class;
     21
     22    my %args = @_;
     23    my $wiki = $args{wiki};
     24
     25    unless ($wiki && UNIVERSAL::isa($wiki, 'Wiki::Toolkit'))
     26    {
     27        croak 'No Wiki::Toolkit object supplied';
     28    }
    2929 
    30   $self->{wiki} = $wiki;
     30    $self->{wiki} = $wiki;
    3131 
    32   # Mandatory arguments.
    33   foreach my $arg (qw/site_name site_url make_node_url recent_changes_link/)
    34   {
    35     croak "No $arg supplied" unless $args{$arg};
    36     $self->{$arg} = $args{$arg};
    37   }
     32    # Mandatory arguments.
     33    foreach my $arg (qw/site_name site_url make_node_url recent_changes_link/)
     34    {
     35        croak "No $arg supplied" unless $args{$arg};
     36        $self->{$arg} = $args{$arg};
     37    }
    3838 
    39   # Optional arguments.
    40   foreach my $arg (qw/site_description interwiki_identifier make_diff_url make_history_url
    41                       software_name software_version software_homepage/)
    42   {
    43     $self->{$arg} = $args{$arg} || '';
    44   }
    45 
    46   $self->{timestamp_fmt} = $Wiki::Toolkit::Store::Database::timestamp_fmt;
    47   $self->{utc_offset} = strftime "%z", localtime;
    48   $self->{utc_offset} =~ s/(..)(..)$/$1:$2/;
    49  
    50   $self;
     39    # Optional arguments.
     40    foreach my $arg (qw/site_description interwiki_identifier make_diff_url make_history_url
     41                        software_name software_version software_homepage/)
     42    {
     43        $self->{$arg} = $args{$arg} || '';
     44    }
     45
     46    $self->{timestamp_fmt} = $Wiki::Toolkit::Store::Database::timestamp_fmt;
     47    $self->{utc_offset} = strftime "%z", localtime;
     48    $self->{utc_offset} =~ s/(..)(..)$/$1:$2/;
     49
     50    $self;
    5151}
    5252
     
    5959sub recent_changes
    6060{
    61   my ($self, %args) = @_;
    62 
    63   my @changes = $self->fetch_recently_changed_nodes(%args);
    64   my $feed_timestamp = $self->feed_timestamp(
     61    my ($self, %args) = @_;
     62
     63    my @changes = $self->fetch_recently_changed_nodes(%args);
     64    my $feed_timestamp = $self->feed_timestamp(
    6565                              $self->fetch_newest_for_recently_changed(%args)
    66   );
    67 
    68   return $self->generate_node_list_feed($feed_timestamp, @changes);
     66    );
     67
     68    return $self->generate_node_list_feed($feed_timestamp, @changes);
    6969}
    7070
     
    7777sub node_all_versions
    7878{
    79   my ($self, %args) = @_;
    80 
    81   my @all_versions = $self->fetch_node_all_versions(%args);
    82   my $feed_timestamp = $self->feed_timestamp( $all_versions[0] );
    83 
    84   return $self->generate_node_list_feed($feed_timestamp, @all_versions);
     79    my ($self, %args) = @_;
     80
     81    my @all_versions = $self->fetch_node_all_versions(%args);
     82    my $feed_timestamp = $self->feed_timestamp( $all_versions[0] );
     83
     84    return $self->generate_node_list_feed($feed_timestamp, @all_versions);
    8585}
    8686
Note: See TracChangeset for help on using the changeset viewer.