Coder Social home page Coder Social logo

p6-pod-load's Introduction

Build status Test in a Raku container

NAME

Pod::Load - Loads and compiles the Pod documentation of an external file

SYNOPSIS

use Pod::Load;
use X::Pod::Load::SourceErrors;

# Try to parse a string
say pod-load(<<EOP).raku;
=head1 Header

=head2 Another header
EOP

# Read a file handle.
my $pod = load("file-with.pod6".IO);
say $pod.raku; # Process it as a Pod

# Or use simply the file name
my @pod = load("file-with.pod6");
say .raku for @pod;

# Or a string
@pod = load("=begin pod\nThis could be a comment with C<code>\n=end pod");

# Or ditch the scaffolding and use the string directly:
@pod = load-pod("This could be a comment with C<code>");

# If there's an error, it will throw X::Pod::Load::SourceErrors

DESCRIPTION

Pod::Load is a module with a simple task: obtain the documentation of an external file in a standard, straighworward way.

Its mechanism was originally inspired by Pod::To::BigPage, from where the code to use the cache was taken from.

multi sub load

multi sub load(
    Str $string
) returns Mu

Loads a string, returns a Pod.

multi sub load

multi sub load(
    Str $file where { ... }
) returns Mu

If it's an actual filename, loads a file and returns the pod

multi sub load

multi sub load(
    IO::Path $io
) returns Mu

Loads a IO::Path, returns a Pod.

INSTALL

Do the usual:

zef install .

to install this if you've made any modification.

INSTRUCTIONS

This is mainly a reminder to myself, although it can help you if you create a distribution just like this one.

Write:

export VERSION=0.x.x

And

make dist

To create a tar file ready for CPAN.

AUTHOR

JJ Merelo [email protected]

COPYRIGHT AND LICENSE

Copyright 2018, 2019, 2020 JJ Merelo

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

p6-pod-load's People

Contributors

jj avatar finanalyst avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.