Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c6bc1816

Von Sven Schöling vor etwa 9 Jahren hinzugefügt

  • ID c6bc181610ac4dd26cfd615075bcc8686dc219cf
  • Vorgänger 778622af
  • Nachfolger e8521020

YAML: Versionsupdate

Unterschiede anzeigen:

modules/override/YAML/Error.pm
1 1
package YAML::Error;
2
use strict; use warnings;
3
use YAML::Base; use base 'YAML::Base';
4 2

  
5
field 'code';
6
field 'type' => 'Error';
7
field 'line';
8
field 'document';
9
field 'arguments' => [];
3
use YAML::Mo;
4

  
5
has 'code';
6
has 'type' => default => sub {'Error'};
7
has 'line';
8
has 'document';
9
has 'arguments' => default => sub {[]};
10 10

  
11 11
my ($error_messages, %line_adjust);
12 12

  
......
149 149
  Can't load an IO filehandle. Yet!!!
150 150
...
151 151

  
152
%line_adjust = map {($_, 1)} 
152
%line_adjust = map {($_, 1)}
153 153
  qw(YAML_PARSE_ERR_BAD_MAJOR_VERSION
154
     YAML_PARSE_WARN_BAD_MINOR_VERSION 
155
     YAML_PARSE_ERR_TEXT_AFTER_INDICATOR 
156
     YAML_PARSE_ERR_NO_ANCHOR 
154
     YAML_PARSE_WARN_BAD_MINOR_VERSION
155
     YAML_PARSE_ERR_TEXT_AFTER_INDICATOR
156
     YAML_PARSE_ERR_NO_ANCHOR
157 157
     YAML_PARSE_ERR_MANY_EXPLICIT
158 158
     YAML_PARSE_ERR_MANY_IMPLICIT
159 159
     YAML_PARSE_ERR_MANY_ANCHOR
......
185 185
    );
186 186

  
187 187
package YAML::Warning;
188
use base 'YAML::Error';
189

  
190
1;
191

  
192
__END__
193

  
194
=head1 NAME
195

  
196
YAML::Error - Error formatting class for YAML modules
197

  
198
=head1 SYNOPSIS
199

  
200
    $self->die('YAML_PARSE_ERR_NO_ANCHOR', $alias);
201
    $self->warn('YAML_LOAD_WARN_DUPLICATE_KEY');
202 188

  
203
=head1 DESCRIPTION
189
our @ISA = 'YAML::Error';
204 190

  
205
This module provides a C<die> and a C<warn> facility.
206

  
207
=head1 AUTHOR
208

  
209
Ingy döt Net <ingy@cpan.org>
210

  
211
=head1 COPYRIGHT
212

  
213
Copyright (c) 2006. Ingy döt Net. All rights reserved.
214

  
215
This program is free software; you can redistribute it and/or modify it
216
under the same terms as Perl itself.
217

  
218
See L<http://www.perl.com/perl/misc/Artistic.html>
219

  
220
=cut
191
1;

Auch abrufbar als: Unified diff