File: Block.pm

package info (click to toggle)
sporum 1.8b1-3.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,108 kB
  • ctags: 676
  • sloc: perl: 14,300; makefile: 52
file content (28 lines) | stat: -rw-r--r-- 418 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package Templates::Admin::Block;

use SmallPigVars qw($config);
use SmallPig;
use strict;

sub new{
  # --- block constructor...
  my ($class, $name) = @_;
  my $self = {};

  $self->{'name'} = $name;
  $self->{'content'} = "";

  return bless $self, $class;
}

sub display{
  my $self = shift;
  print $self->{'content'};
}

sub set_content{
  my ($self, $content) = @_;
  $self->{'content'} = $content;
}

return 1;