Getting started with Pod::Weaver
-
Upload
joshua-keroes -
Category
Technology
-
view
2.561 -
download
0
Transcript of Getting started with Pod::Weaver
![Page 1: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/1.jpg)
Pod::WeaverModule author: Ricardo SignesTalk author: Joshua KeroesDate: 13 Sep 2012
![Page 2: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/2.jpg)
Who likes to write documentation?
http://www.flickr.com/photos/bensonkua/2687804310/
2
![Page 3: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/3.jpg)
What sucks about documentation?
3
![Page 4: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/4.jpg)
It violates the DRY rule.
What sucks about documentation?
3
![Page 5: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/5.jpg)
It violates the DRY rule.
What sucks about documentation?
3
![Page 6: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/6.jpg)
What else sucks?
4
![Page 7: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/7.jpg)
What else sucks?
POD is too verbose.
=head1 FUNCTIONS
=over
=item frowny()
Returns a frowny face.
=back4
![Page 8: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/8.jpg)
What else sucks?Let it all out.
=head1 COPYRIGHT AND LICENSE
Copyright (c) 1901 Fergie T. Sumtin.
All rights reserved.
5
![Page 9: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/9.jpg)
Templates to the rescue
6
![Page 10: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/10.jpg)
Templates to the rescue
POD::Weaver uses a template.
It’s called weaver.ini.
6
![Page 11: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/11.jpg)
weaver.ini [@Default]
[@Default]
7
![Page 12: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/12.jpg)
weaver.ini [@Default][@CorePrep]
[Name]
[Version]
[Region / prelude]
[Generic / SYNOPSIS]
[Generic / DESCRIPTION]
[Generic / OVERVIEW]
[Collect / ATTRIBUTES]
command = attr
[Collect / METHODS]
command = method
[Leftovers]
[Region / postlude]
[Authors] 8
![Page 13: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/13.jpg)
weaver.ini [@Default][EnsurePod5]
[H1Nester]
[Name]
[Version]
[Region / prelude]
[Generic / SYNOPSIS]
[Generic / DESCRIPTION]
[Generic / OVERVIEW]
[Collect / ATTRIBUTES]
command = attr
[Collect / METHODS]
command = method
[Leftovers]
[Region / postlude]
[Authors] 9
![Page 14: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/14.jpg)
weaver.ini [@Default][EnsurePod5]
[H1Nester]
[Name]
[Version]
[Region / prelude]
[Generic / SYNOPSIS]
[Generic / DESCRIPTION]
[Generic / OVERVIEW]
[Collect / ATTRIBUTES]
command = attr
[Collect / METHODS]
command = method
[Collect / FUNCTIONS]
command = func
[Leftovers]
[Region / postlude]
[Authors] 10
![Page 15: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/15.jpg)
weaver.ini [@Default][EnsurePod5]
[H1Nester]
[Name]
[Version]
[Region / prelude]
[Generic / SYNOPSIS]
[Generic / DESCRIPTION]
[Generic / OVERVIEW]
[Collect / ATTRIBUTES]
command = attr
[Collect / METHODS]
command = method
[Collect / FUNCTIONS]
command = func
[Leftovers]
[Region / postlude]
[Authors] 11
![Page 16: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/16.jpg)
[NAME]
=head1 NAME
Some::Package::Name - just a package
12
![Page 17: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/17.jpg)
[NAME]
=head1 NAME
Some::Package::Name - just a package
# PODNAME: Some::Package::Name
# ABSTRACT: just a package
13
![Page 18: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/18.jpg)
[NAME]
=head1 NAME
Some::Package::Name - just a package
package Some::Package::Name
# ABSTRACT: just a package
14
![Page 19: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/19.jpg)
[VERSION]
=head1 VERSION
version 1.234
15
![Page 20: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/20.jpg)
[Generic / SYNOPSIS][Generic / DESCRIPTION][Generic / OVERVIEW]
=head1 SYNOPSIS
my $p = Some::Package::Name->new;
say $p;
=head1 DESCRIPTION
A module that knows it’s own package name.
16
![Page 21: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/21.jpg)
[Collect / FUNCTIONS]command = func=head1 FUNCTIONS
=over
=item binge()
eats arguments
=item purge()
returns eaten args
=back
17
![Page 22: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/22.jpg)
[Collect / FUNCTIONS]command = func=head1 FUNCTIONS
=over
=item binge()
eats arguments
=item purge()
returns eaten args
=back
=func binge()
eats arguments
=func purge()
returns eaten args
18
![Page 23: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/23.jpg)
[Collect / METHODS]command = method=head1 METHODS
=over
=item new()
creates an object
=item spawn()
spawns an object
=back
19
![Page 24: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/24.jpg)
[Collect / METHODS]command = method=head1 METHODS
=over
=item new()
creates an object
=item spawn()
spawns an object
=back
=method new()
creates an object
=method spawn()
spawns an object
20
![Page 25: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/25.jpg)
[Collect / ATTRIBUTES]command = attr=head1 ATTRIBUTES
=over
=item torches()
number of torches
=item matches()
number of matches
=back
21
![Page 26: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/26.jpg)
[Collect / ATTRIBUTES]command = attr=head1 ATTRIBUTES
=over
=item torches()
number of torches
=item matches()
number of matches
=back
=attr torches()
number of torches
=attr matches()
number of matches
22
![Page 27: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/27.jpg)
[Region / prelude]
=begin :prelude
…
=end :prelude
=for :prelude …
weaver.ini
[Name]
[Version]
[Region / prelude]
[Generic / SYNOPSIS]
[Generic / DESCRIPTION]
…
23
![Page 28: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/28.jpg)
=head1 SUPPORT
For support, please send a self-addressed, stamped envelope to:
Joshua Keroes
Somewhere in
Portland, OR
weaver.ini
…
[Leftovers]
[Region / postlude]
[Authors]
[Legal]
[Leftovers]
24
![Page 29: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/29.jpg)
[Region / postlude]
=begin :postlude
…
=end :postlude
=for :postlude …
weaver.ini
…
[Leftovers]
[Region / postlude]
[Authors]
[Legal]
25
![Page 30: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/30.jpg)
[Authors]
=head1 AUTHORS
Colette O’Day <[email protected]>
weaver.ini
…
[Leftovers]
[Region / postlude]
[Authors]
[Legal]
26
![Page 31: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/31.jpg)
[Legal]
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Joshua Keroes.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
27
![Page 32: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/32.jpg)
Let’s sum up.
28
![Page 33: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/33.jpg)
Leaner POD
No more NAME
No more VERSION
No more AUTHORS
No more COPYRIGHT AND LICENSE
29
![Page 34: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/34.jpg)
Leaner POD
Cleaner subroutine definitions
=func
=method
=attr
30
![Page 35: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/35.jpg)
Beyond @Default
![Page 36: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/36.jpg)
Lists, the lazy way
weaver.ini
[@Default]
[-Transformer]
transformer = List
32
![Page 37: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/37.jpg)
Lists
=head1 SEE ALSO
=over 4
=item *
L<Your::Module>
=item *
L<Your::Package>
=back
33
![Page 38: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/38.jpg)
Pod::Weaver bullet lists
=head1 SEE ALSO
=over 4
=item *
L<Your::Module>
=item *
L<Your::Package>
=back
=head1 SEE ALSO
=for :list
* L<Your::Module>
* L<Your::Package>
34
![Page 39: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/39.jpg)
Pod::Weaver numeric lists
=head1 SEE ALSO
=over 4
=item *
L<Your::Module>
=item *
L<Your::Package>
=back
=head1 SEE ALSO
=for :list
1. L<Your::Module>
1. L<Your::Package>
35
![Page 40: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/40.jpg)
Pod::Weaver frontends
36
![Page 41: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/41.jpg)
Dist::Zilla
dist.ini
[PodWeaver]
…
37
![Page 42: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/42.jpg)
App::podweaver
Great for troubleshooting; bypassing Dist::Zilla
podweaver lib/path/to/file.pm
38
![Page 43: Getting started with Pod::Weaver](https://reader033.fdocuments.net/reader033/viewer/2022052116/55a18db01a28abcf0f8b4651/html5/thumbnails/43.jpg)
References
This talk at SlideShare: http://xrl.us/jkeroespw
Dist::Zilla + Pod::Weaver http://xrl.us/dzilpw
What is Pod::Weaver 1? http://xrl.us/rjbspw1
What is POD::Weaver 2? http://xrl.us/rjbspw2
Falling in love with Pod::Weaver http://xrl.us/lovepw
39