[Solved]:Read Data from Yaml

Moderator: crythias

Locked
crons
Znuny newbie
Posts: 58
Joined: 17 Aug 2012, 06:11
Znuny Version: 3.3.x
Real Name: Cornelius Jackson

[Solved]:Read Data from Yaml

Post by crons »

Code: Select all

my $config = $Self->{YAMLObject}->Load( Data => $Data[7] );
the yaml data :

Code: Select all

DefaultValue: ''
Link: ''
PossibleNone: 1
PossibleValues:
A: A
B: B
C: C
TranslatableValues: 0

i want to extract "PossibleValues".
Last edited by crons on 08 May 2013, 18:47, edited 2 times in total.
OTRS 3.3.x, Ubuntu, MySql 5.5
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Read Data from Yaml

Post by reneeb »

Code: Select all

my $possible = $config->{PossibleValues};
Please use the

Code: Select all

-Tags. Then the indentations aren't lost and it's more readable.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
crons
Znuny newbie
Posts: 58
Joined: 17 Aug 2012, 06:11
Znuny Version: 3.3.x
Real Name: Cornelius Jackson

Re: Read Data from Yaml

Post by crons »

Thanks Worked like a Charm :-)
OTRS 3.3.x, Ubuntu, MySql 5.5
Locked