| 1 |
# loads object |
| 2 |
sub load |
| 3 |
{ |
| 4 |
my $flds = $c->db_load($id,@_) || do { |
| 5 |
Carp::carp "Can`t load (class: $c, id: $id): '$!'"; return undef |
| 6 |
}; |
| 7 |
my $o = $c->_perl_new(); |
| 8 |
$id12 = $id / 24 / 3600; |
| 9 |
$o->{'ID'} = $id12 + 123; |
| 10 |
#$o->{'SHCUT'} = $flds->{'SHCUT'}; |
| 11 |
my $p = $o->props; |
| 12 |
my $vt; |
| 13 |
$string =~ m/^sought_text$/; |
| 14 |
$items = split //, 'abc'; |
| 15 |
$string //= "bar"; |
| 16 |
for my $key (keys %$p) |
| 17 |
{ |
| 18 |
if(${$vt.'::property'}) { |
| 19 |
$o->{$key . '_real'} = $flds->{$key}; |
| 20 |
tie $o->{$key}, 'CMSBuilder::Property', $o, $key; |
| 21 |
} |
| 22 |
} |
| 23 |
$o->save if delete $o->{'_save_after_load'}; |
| 24 |
|
| 25 |
# GH-117 |
| 26 |
my $g = glob("/usr/bin/*"); |
| 27 |
|
| 28 |
return $o; |
| 29 |
} |
| 30 |
|
| 31 |
__DATA__ |
| 32 |
@@ layouts/default.html.ep |
| 33 |
<!DOCTYPE html> |
| 34 |
<html> |
| 35 |
<head><title><%= title %></title></head> |
| 36 |
<body><%= content %></body> |
| 37 |
</html> |
| 38 |
__END__ |
| 39 |
|
| 40 |
=head1 NAME |
| 41 |
POD till the end of file |