X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=modules%2Foverride%2FYAML%2FError.pm;h=e855092f0b867d05c9ac362a197dd080fec45001;hb=4624b1871cd01c87b667415a87cc6f0820f7068b;hp=23b9c5ca51f06fa3a5227b05e5c7ed03be32dcca;hpb=b179b8df8426376f1592c7fdc3e693ed564c2fc3;p=kivitendo-erp.git diff --git a/modules/override/YAML/Error.pm b/modules/override/YAML/Error.pm index 23b9c5ca5..e855092f0 100644 --- a/modules/override/YAML/Error.pm +++ b/modules/override/YAML/Error.pm @@ -1,12 +1,12 @@ package YAML::Error; -use strict; use warnings; -use YAML::Base; use base 'YAML::Base'; -field 'code'; -field 'type' => 'Error'; -field 'line'; -field 'document'; -field 'arguments' => []; +use YAML::Mo; + +has 'code'; +has 'type' => default => sub {'Error'}; +has 'line'; +has 'document'; +has 'arguments' => default => sub {[]}; my ($error_messages, %line_adjust); @@ -149,11 +149,11 @@ YAML_LOAD_WARN_GLOB_IO Can't load an IO filehandle. Yet!!! ... -%line_adjust = map {($_, 1)} +%line_adjust = map {($_, 1)} qw(YAML_PARSE_ERR_BAD_MAJOR_VERSION - YAML_PARSE_WARN_BAD_MINOR_VERSION - YAML_PARSE_ERR_TEXT_AFTER_INDICATOR - YAML_PARSE_ERR_NO_ANCHOR + YAML_PARSE_WARN_BAD_MINOR_VERSION + YAML_PARSE_ERR_TEXT_AFTER_INDICATOR + YAML_PARSE_ERR_NO_ANCHOR YAML_PARSE_ERR_MANY_EXPLICIT YAML_PARSE_ERR_MANY_IMPLICIT YAML_PARSE_ERR_MANY_ANCHOR @@ -185,36 +185,7 @@ YAML_LOAD_WARN_GLOB_IO ); package YAML::Warning; -use base 'YAML::Error'; - -1; - -__END__ - -=head1 NAME - -YAML::Error - Error formatting class for YAML modules - -=head1 SYNOPSIS - - $self->die('YAML_PARSE_ERR_NO_ANCHOR', $alias); - $self->warn('YAML_LOAD_WARN_DUPLICATE_KEY'); -=head1 DESCRIPTION +our @ISA = 'YAML::Error'; -This module provides a C and a C facility. - -=head1 AUTHOR - -Ingy döt Net - -=head1 COPYRIGHT - -Copyright (c) 2006. Ingy döt Net. All rights reserved. - -This program is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -See L - -=cut +1;