Changeset 13830
- Timestamp:
- 06/13/08 22:45:55 (5 years ago)
- Files:
-
- 1 modified
-
lang/perl/tiarra/trunk/main/BulletinBoard.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/tiarra/trunk/main/BulletinBoard.pm
r11365 r13830 23 23 my ($class_or_this,$key,$value) = @_; 24 24 my $this = $class_or_this->_this; 25 $this->{table}->{$key} = $value; 25 if (defined $value) { 26 $this->{table}->{$key} = $value; 27 } else { 28 delete $this->{table}->{$key}; 29 } 26 30 $this; 27 31 } … … 40 44 # $board->foo_bar => $board->get('foo-bar') 41 45 # $board->foo_bar('foo') => $board->set('foo-bar','foo'); 42 my ($class_or_this,$newvalue) = @_;46 my $class_or_this = shift; 43 47 my $this = $class_or_this->_this; 44 48 (my $key = $AUTOLOAD) =~ s/.+?:://g; 45 49 $key =~ s/_/-/g; 46 50 47 if ( defined $newvalue) {48 $this->set($key, $newvalue);51 if (@_ > 0) { 52 $this->set($key, @_); 49 53 } 50 54 else {
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)