logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Perlanet::Trait::YAMLConfig - configure Perlanet through a YAML configuration file

Author

Description

       Allows you to move the configuration of Perlanet to an external YAML configuration file.

   ExampleConfigurationFile
         title: planet test
         description: A Test Planet
         url: http://planet.example.com/
         author:
           name: Dave Cross
           email: dave@dave.org.uk
         entries: 20
         opml: opml.xml
         page:
           file: index.html
           template: index.tt
         feed:
           file: atom.xml
           format: Atom
         cache_dir: /tmp/feeds
         feeds:
           - url: http://blog.dave.org.uk/atom.xml
             title: Dave's Blog
             web: http://blog.dave.org.uk/
           - url: http://use.perl.org/~davorg/journal/rss
             title: Dave's use.perl Journal
             web: http://use.perl.org/~davorg/journal/
           - url: http://www.oreillynet.com/pub/feed/31?au=2607
             title: Dave on O'Reillynet
             web: http://www.oreillynet.com/pub/au/2607

Methods

get_config_from_file
       Extracts the configuration from a YAML file

   read_config
       Actually reads the YAML.

Name

       Perlanet::Trait::YAMLConfig - configure Perlanet through a YAML configuration file

Synopsis

          package MyPerlanet;
          extends 'Perlanet';
          with 'Perlanet::Traits::YAMLConfig';

          my $perlanet = MyPerlanet->new_with_config(
            configfile => 'whatever.yml'
          );

          $perlanet->run;

See Also