wiki:PadrePluginYAML

Version 24 (modified by bowtie, 3 years ago) (diff)

--

<-plug-ins

Padre::Plugin::YAML

YAML plug-in that provides background syntax checking

  • By using YAML::XS we get great feedback ( Binding to libyaml, "C" Fast YAML 1.1 )
    • win32 user's will need to use YAML due to issue with YAML::XS on win32

To-Do

  • release version 0.04 after Padre 0.96, due to dependencies issues
  • tidy up code
  • syntax panel dose not show a green square when clean

Limitations

  • directives are supported only for the %YAML 1.1 or none
%YAML 1.1
# --- document separator
---
plack_middlewares:
  -
    - Expires
    - Deflater
    - StackTrace
    - Debug
    - panels
    -
      - Parameters
      - Dancer::Version
      - Dancer::Settings
      - Memory
      - PerlConfig
      - DBITrace 
      - ModuleVersions
...
# comments like so
---
rootproperty: blah
section:
  one: two
  three: four
  Foo: Bar
  empty: ~
# ... indicate the end of a document
...

Another example

%YAML 1.1
---
 - - item 1
   - item 2
 - key 1: value 1
   key 2: value 2
 - ? complex key
   : complex value
...

Formal

Blog's

  • blog1 YAML and the importance of Schema Validation

kwalify (our Ruby friends)

On Line validation

Debugging

  • Use the following to track down "Unknown YAML error" displayed in Syntax Panel.
    perl dev -a -t Padre::Plugin::YAML::Syntax
    


__END__

<-plug-ins