Revision 65b2387a
Von Moritz Bunkus vor mehr als 5 Jahren hinzugefügt
SL/Auth/SessionValue.pm | ||
---|---|---|
7 | 7 |
use SL::Locale::String (); |
8 | 8 |
|
9 | 9 |
use Scalar::Util qw(weaken); |
10 |
use YAML; |
|
11 | 10 |
|
12 | 11 |
use SL::DBUtils; |
12 |
use SL::YAML; |
|
13 | 13 |
|
14 | 14 |
sub new { |
15 | 15 |
my ($class, %params) = @_; |
... | ... | |
39 | 39 |
my ($self) = @_; |
40 | 40 |
no warnings 'once'; |
41 | 41 |
local $YAML::Stringify = 1; |
42 |
return YAML::Dump($self->get); |
|
42 |
return SL::YAML::Dump($self->get);
|
|
43 | 43 |
} |
44 | 44 |
|
45 | 45 |
sub _fetch { |
... | ... | |
58 | 58 |
sub _parse { |
59 | 59 |
my ($self) = @_; |
60 | 60 |
|
61 |
$self->{value} = YAML::Load($self->{value}) unless $self->{parsed}; |
|
61 |
$self->{value} = SL::YAML::Load($self->{value}) unless $self->{parsed};
|
|
62 | 62 |
$self->{parsed} = 1; |
63 | 63 |
|
64 | 64 |
return $self; |
... | ... | |
71 | 71 |
|
72 | 72 |
my %params = ( simple => 1 ); |
73 | 73 |
eval { |
74 |
my $data = YAML::Load($value); |
|
74 |
my $data = SL::YAML::Load($value);
|
|
75 | 75 |
|
76 | 76 |
if (ref $data eq 'HASH') { |
77 | 77 |
map { $params{$_} = $data->{$_} } keys %{ $data }; |
Auch abrufbar als: Unified diff
Module: gebundletes YAML durch dünnen Wrapper über YAML::XS & YAML ersetzt