Pandoc-Elements

 view release on metacpan or  search on metacpan

lib/Pandoc/Metadata.pm  view on Meta::CPAN

    sub value { shift->value(@_) }
}

# # For Pandoc::Metadata::Error
# {
#     package Pandoc::Metadata::Error;
#     use overload q[""] => 'shortmess', q[%{}] => 'data', fallback => 1;
#     use constant { SHORTMESS => 0, LONGMESS => 1, DATA => 2 };
#     sub new {
#         my($class, @values) = @_;   # CLASS, (MESSAGE, {DATA})
#         bless \@values => $class;
#     }
#     sub shortmess { shift->[SHORTMESS] }
#     sub longmess { shift->[LONGMESS] }
#     sub data { shift->[DATA] }
#     sub rethrow { die shift }
#     sub throw { shift->new( @_ )->rethrow }
# }

# helpers

t/citation.t  view on Meta::CPAN

use Pandoc::Elements;

use constant STRINGLIKE => 'Pandoc::Document::Citation::Test::Stringlike';

{
    package # no index
        Pandoc::Document::Citation::Test::Stringlike;
    use overload q[""] => sub {  ${$_[0]} }, fallback => 1;
    sub new {
        my($class, $value) = @_;
        return bless \$value => $class;
    }
}

my @accessors = (
    [ hash   => "citationHash" ],
    [ id     => "citationId" ],
    [ mode   => "citationMode" ],
    [ num    => "citationNoteNum" ],
    [ prefix => "citationPrefix" ],
    [ suffix => "citationSuffix" ],

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 2.141 seconds using v1.00-cache-2.02-grep-82fe00e-cpan-f5108d614456 )