CONTRIBUTING 000664 001750 001750 6146 12403004676 13312 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012 NAME
CONTRIBUTING
DESCRIPTION
If you're reading this document, that means you might be thinking about
helping me out with this project. Thanks!
Here's some ways you could help out:
* Bug reports
Found a bug? Great! (Well, not so great I suppose.)
The place to report them is . Don't e-mail me
about it, as your e-mail is more than likely to get lost amongst the
spam.
An example script clearly demonstrating the bug (preferably written
using Test::More) would be greatly appreciated.
* Patches
If you've found a bug and written a fix for it, even better!
Generally speaking you should check out the latest copy of the code
from the source repository rather than using the CPAN distribution.
The file META.yml should contain a link to the source repository. If
not, then try or submit a bug report.
(As far as I'm concerned the lack of a link is a bug.) Many of my
distributions are also mirrored at .
To submit the patch, do a pull request on GitHub or Bitbucket, or
attach a diff file to a bug report. Unless otherwise stated, I'll
assume that your contributions are licensed under the same terms as
the rest of the project.
(If using git, feel free to work in a branch. For Mercurial, I'd
prefer bookmarks within the default branch.)
* Documentation
If there's anything unclear in the documentation, please submit this
as a bug report or patch as above.
Non-toy example scripts that I can bundle would also be appreciated.
* Translation
Translations of documentation would be welcome.
For translations of error messages and other strings embedded in the
code, check with me first. Sometimes the English strings may not in
a stable state, so it would be a waste of time translating them.
Coding Style
I tend to write using something approximating the Allman style, using
tabs for indentation and Unix-style line breaks.
*
*
I nominally encode all source files as UTF-8, though in practice most of
them use a 7-bit-safe ASCII-compatible subset of UTF-8.
AUTHOR
Toby Inkster .
COPYRIGHT AND LICENCE
Copyright (c) 2012-2014 by Toby Inkster.
CONTRIBUTING is available under three different licences permitting its
redistribution: the CC-BY-SA_UK-2.0 licence, plus the same licences as
Perl itself, which is distributed under the GNU General Public Licence
version 1, and the Artistic Licence.
This file is licensed under the Creative Commons Attribution-ShareAlike
2.0 UK: England & Wales License. To view a copy of this license, visit
.
This file is free software; you can redistribute it and/or modify it
under the same terms as the Perl 5 programming language system itself.
COPYRIGHT 000664 001750 001750 3442 12403004676 12747 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: RDF-DOAP
Upstream-Contact: Toby Inkster (TOBYINK)
Source: https://metacpan.org/release/RDF-DOAP
Files: Changes
META.json
META.yml
doap.ttl
lib/RDF/DOAP/Change.pm
lib/RDF/DOAP/Change/Addition.pm
lib/RDF/DOAP/Change/BackCompat.pm
lib/RDF/DOAP/Change/Bugfix.pm
lib/RDF/DOAP/Change/Documentation.pm
lib/RDF/DOAP/Change/Packaging.pm
lib/RDF/DOAP/Change/Regression.pm
lib/RDF/DOAP/Change/Removal.pm
lib/RDF/DOAP/Change/SecurityFix.pm
lib/RDF/DOAP/Change/SecurityRegression.pm
lib/RDF/DOAP/Change/Tests.pm
lib/RDF/DOAP/Change/Update.pm
lib/RDF/DOAP/ChangeSet.pm
lib/RDF/DOAP/Issue.pm
lib/RDF/DOAP/Person.pm
lib/RDF/DOAP/Project.pm
lib/RDF/DOAP/Repository.pm
lib/RDF/DOAP/Resource.pm
lib/RDF/DOAP/Types.pm
lib/RDF/DOAP/Utils.pm
lib/RDF/DOAP/Version.pm
Copyright: Copyright 2014 Toby Inkster.
License: GPL-1.0+ or Artistic-1.0
Files: CONTRIBUTING
INSTALL
LICENSE
examples/changelog.pl
examples/credits.pl
examples/gnome-data.pl
examples/moose-data.pl
examples/simple.pl
Copyright: Unknown
License: Unknown
Files: README
lib/RDF/DOAP.pm
t/01basic.t
t/02changelog.t
Copyright: This software is copyright (c) 2013 by Toby Inkster.
License: GPL-1.0+ or Artistic-1.0
Files: COPYRIGHT
CREDITS
SIGNATURE
Copyright: None
License: public-domain
Files: Makefile.PL
dist.ini
Copyright: Copyright 2013 Toby Inkster.
License: GPL-1.0+ or Artistic-1.0
License: Artistic-1.0
This software is Copyright (c) 2014 by the copyright holder(s).
This is free software, licensed under:
The Artistic License 1.0
License: GPL-1.0
This software is Copyright (c) 2014 by the copyright holder(s).
This is free software, licensed under:
The GNU General Public License, Version 1, February 1989
CREDITS 000664 001750 001750 71 12403004673 12424 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012 Maintainer:
- Toby Inkster (TOBYINK)
Changes 000664 001750 001750 2540 12403004673 12742 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012 RDF-DOAP
========
Created: 2013-08-11
Home page:
Bug tracker:
Maintainer: Toby Inkster (TOBYINK)
0.012 2014-09-07
[ Bug Fixes ]
- Prevent gather_objects from returning non-references.
0.011 2014-08-12
[ Bug Fixes ]
- Don't import Types::Standard type constraints twice over.
0.010 2013-09-30
[ Bug Fixes ]
- Use Exporter::Tiny instead of Exporter::TypeTiny.
0.009 2013-09-07
[ Bug Fixes ]
- Fix entries in changelog for changes with no explicit rdf:type.
0.008 2013-09-03
[ Bug Fixes ]
- Fix some 'uninitialized' warnings.
0.007 2013-09-03
- Make sure entries within changelog groups are lexicograpically sorted.
0.006 2013-09-03
- Updated: New roles added for dcs:BackCompat and dcs:Tests.
0.005 2013-08-13
[ Bug Fixes ]
- Further fix for `rdf_get`, `rdf_get_literal` and `rdf_get_uri` methods.
0.004 2013-08-13
[ Bug Fixes ]
- Fix `rdf_get`, `rdf_get_literal` and `rdf_get_uri` methods.
[ Packaging ]
- Add missing dep on Test::LongString.
[ Other ]
- Improved stringification for RDF::DOAP::Person.
0.003 2013-08-13
- Added: RDF::DOAP::Resource now has `rdf_get`, `rdf_get_literal` and
`rdf_get_uri` methods.
0.002 2013-08-12
[ Packaging ]
- Various mini fixes.
0.001 2013-08-12 Initial release
INSTALL 000664 001750 001750 1646 12403004672 12505 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012 Installing RDF-DOAP should be straightforward.
INSTALLATION WITH CPANMINUS
If you have cpanm, you only need one line:
% cpanm RDF::DOAP
If you are installing into a system-wide directory, you may need to pass
the "-S" flag to cpanm, which uses sudo to install the module:
% cpanm -S RDF::DOAP
INSTALLATION WITH THE CPAN SHELL
Alternatively, if your CPAN shell is set up, you should just be able to
do:
% cpan RDF::DOAP
MANUAL INSTALLATION
As a last resort, you can manually install it. Download the tarball and
unpack it.
Consult the file META.json for a list of pre-requisites. Install these
first.
To build RDF-DOAP:
% perl Makefile.PL
% make && make test
Then install it:
% make install
If you are installing into a system-wide directory, you may need to run:
% sudo make install
LICENSE 000664 001750 001750 43655 12403004672 12507 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012 This software is copyright (c) 2014 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
Terms of the Perl programming language system itself
a) the GNU General Public License as published by the Free
Software Foundation; either version 1, or (at your option) any
later version, or
b) the "Artistic License"
--- The GNU General Public License, Version 1, February 1989 ---
This software is Copyright (c) 2014 by Toby Inkster.
This is free software, licensed under:
The GNU General Public License, Version 1, February 1989
GNU GENERAL PUBLIC LICENSE
Version 1, February 1989
Copyright (C) 1989 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The license agreements of most software companies try to keep users
at the mercy of those companies. By contrast, our General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. The
General Public License applies to the Free Software Foundation's
software and to any other program whose authors commit to using it.
You can use it for your programs, too.
When we speak of free software, we are referring to freedom, not
price. Specifically, the General Public License is designed to make
sure that you have the freedom to give away or sell copies of free
software, that you receive source code or can get it if you want it,
that you can change the software or use pieces of it in new free
programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of a such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must tell them their rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any program or other work which
contains a notice placed by the copyright holder saying it may be
distributed under the terms of this General Public License. The
"Program", below, refers to any such program or work, and a "work based
on the Program" means either the Program or any work containing the
Program or a portion of it, either verbatim or with modifications. Each
licensee is addressed as "you".
1. You may copy and distribute verbatim copies of the Program's source
code as you receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice and
disclaimer of warranty; keep intact all the notices that refer to this
General Public License and to the absence of any warranty; and give any
other recipients of the Program a copy of this General Public License
along with the Program. You may charge a fee for the physical act of
transferring a copy.
2. You may modify your copy or copies of the Program or any portion of
it, and copy and distribute such modifications under the terms of Paragraph
1 above, provided that you also do the following:
a) cause the modified files to carry prominent notices stating that
you changed the files and the date of any change; and
b) cause the whole of any work that you distribute or publish, that
in whole or in part contains the Program or any part thereof, either
with or without modifications, to be licensed at no charge to all
third parties under the terms of this General Public License (except
that you may choose to grant warranty protection to some or all
third parties, at your option).
c) If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use
in the simplest and most usual way, to print or display an
announcement including an appropriate copyright notice and a notice
that there is no warranty (or else, saying that you provide a
warranty) and that users may redistribute the program under these
conditions, and telling the user how to view a copy of this General
Public License.
d) You may charge a fee for the physical act of transferring a
copy, and you may at your option offer warranty protection in
exchange for a fee.
Mere aggregation of another independent work with the Program (or its
derivative) on a volume of a storage or distribution medium does not bring
the other work under the scope of these terms.
3. You may copy and distribute the Program (or a portion or derivative of
it, under Paragraph 2) in object code or executable form under the terms of
Paragraphs 1 and 2 above provided that you also do one of the following:
a) accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of
Paragraphs 1 and 2 above; or,
b) accompany it with a written offer, valid for at least three
years, to give any third party free (except for a nominal charge
for the cost of distribution) a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of
Paragraphs 1 and 2 above; or,
c) accompany it with the information you received as to where the
corresponding source code may be obtained. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form alone.)
Source code for a work means the preferred form of the work for making
modifications to it. For an executable file, complete source code means
all the source code for all modules it contains; but, as a special
exception, it need not include source code for modules which are standard
libraries that accompany the operating system on which the executable
file runs, or for standard header files or definitions files that
accompany that operating system.
4. You may not copy, modify, sublicense, distribute or transfer the
Program except as expressly provided under this General Public License.
Any attempt otherwise to copy, modify, sublicense, distribute or transfer
the Program is void, and will automatically terminate your rights to use
the Program under this License. However, parties who have received
copies, or rights to use copies, from you under this General Public
License will not have their licenses terminated so long as such parties
remain in full compliance.
5. By copying, distributing or modifying the Program (or any work based
on the Program) you indicate your acceptance of this license to do so,
and all its terms and conditions.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the original
licensor to copy, distribute or modify the Program subject to these
terms and conditions. You may not impose any further restrictions on the
recipients' exercise of the rights granted herein.
7. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of the license which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
the license, you may choose any version ever published by the Free Software
Foundation.
8. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
Copyright (C) 19yy
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the
appropriate parts of the General Public License. Of course, the
commands you use may be called something other than `show w' and `show
c'; they could even be mouse-clicks or menu items--whatever suits your
program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
program `Gnomovision' (a program to direct compilers to make passes
at assemblers) written by James Hacker.
, 1 April 1989
Ty Coon, President of Vice
That's all there is to it!
--- The Artistic License 1.0 ---
This software is Copyright (c) 2014 by Toby Inkster.
This is free software, licensed under:
The Artistic License 1.0
The Artistic License
Preamble
The intent of this document is to state the conditions under which a Package
may be copied, such that the Copyright Holder maintains some semblance of
artistic control over the development of the package, while giving the users of
the package the right to use and distribute the Package in a more-or-less
customary fashion, plus the right to make reasonable modifications.
Definitions:
- "Package" refers to the collection of files distributed by the Copyright
Holder, and derivatives of that collection of files created through
textual modification.
- "Standard Version" refers to such a Package if it has not been modified,
or has been modified in accordance with the wishes of the Copyright
Holder.
- "Copyright Holder" is whoever is named in the copyright or copyrights for
the package.
- "You" is you, if you're thinking about copying or distributing this Package.
- "Reasonable copying fee" is whatever you can justify on the basis of media
cost, duplication charges, time of people involved, and so on. (You will
not be required to justify it to the Copyright Holder, but only to the
computing community at large as a market that must bear the fee.)
- "Freely Available" means that no fee is charged for the item itself, though
there may be fees involved in handling the item. It also means that
recipients of the item may redistribute it under the same conditions they
received it.
1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers.
2. You may apply bug fixes, portability fixes and other modifications derived
from the Public Domain or from the Copyright Holder. A Package modified in such
a way shall still be considered the Standard Version.
3. You may otherwise modify your copy of this Package in any way, provided that
you insert a prominent notice in each changed file stating how and when you
changed that file, and provided that you do at least ONE of the following:
a) place your modifications in the Public Domain or otherwise make them
Freely Available, such as by posting said modifications to Usenet or an
equivalent medium, or placing the modifications on a major archive site
such as ftp.uu.net, or by allowing the Copyright Holder to include your
modifications in the Standard Version of the Package.
b) use the modified Package only within your corporation or organization.
c) rename any non-standard executables so the names do not conflict with
standard executables, which must also be provided, and provide a separate
manual page for each non-standard executable that clearly documents how it
differs from the Standard Version.
d) make other distribution arrangements with the Copyright Holder.
4. You may distribute the programs of this Package in object code or executable
form, provided that you do at least ONE of the following:
a) distribute a Standard Version of the executables and library files,
together with instructions (in the manual page or equivalent) on where to
get the Standard Version.
b) accompany the distribution with the machine-readable source of the Package
with your modifications.
c) accompany any non-standard executables with their corresponding Standard
Version executables, giving the non-standard executables non-standard
names, and clearly documenting the differences in manual pages (or
equivalent), together with instructions on where to get the Standard
Version.
d) make other distribution arrangements with the Copyright Holder.
5. You may charge a reasonable copying fee for any distribution of this
Package. You may charge any fee you choose for support of this Package. You
may not charge a fee for this Package itself. However, you may distribute this
Package in aggregate with other (possibly commercial) programs as part of a
larger (possibly commercial) software distribution provided that you do not
advertise this Package as a product of your own.
6. The scripts and library files supplied as input to or produced as output
from the programs of this Package do not automatically fall under the copyright
of this Package, but belong to whomever generated them, and may be sold
commercially, and may be aggregated with this Package.
7. C or perl subroutines supplied by you and linked into this Package shall not
be considered part of this Package.
8. The name of the Copyright Holder may not be used to endorse or promote
products derived from this software without specific prior written permission.
9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The End
MANIFEST 000664 001750 001750 1566 12403004676 12612 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012 CONTRIBUTING
COPYRIGHT
CREDITS
Changes
INSTALL
LICENSE
MANIFEST
META.json
META.yml
Makefile.PL
README
SIGNATURE
dist.ini
doap.ttl
examples/changelog.pl
examples/credits.pl
examples/gnome-data.pl
examples/moose-data.pl
examples/simple.pl
lib/RDF/DOAP.pm
lib/RDF/DOAP/Change.pm
lib/RDF/DOAP/Change/Addition.pm
lib/RDF/DOAP/Change/BackCompat.pm
lib/RDF/DOAP/Change/Bugfix.pm
lib/RDF/DOAP/Change/Documentation.pm
lib/RDF/DOAP/Change/Packaging.pm
lib/RDF/DOAP/Change/Regression.pm
lib/RDF/DOAP/Change/Removal.pm
lib/RDF/DOAP/Change/SecurityFix.pm
lib/RDF/DOAP/Change/SecurityRegression.pm
lib/RDF/DOAP/Change/Tests.pm
lib/RDF/DOAP/Change/Update.pm
lib/RDF/DOAP/ChangeSet.pm
lib/RDF/DOAP/Issue.pm
lib/RDF/DOAP/Person.pm
lib/RDF/DOAP/Project.pm
lib/RDF/DOAP/Repository.pm
lib/RDF/DOAP/Resource.pm
lib/RDF/DOAP/Types.pm
lib/RDF/DOAP/Utils.pm
lib/RDF/DOAP/Version.pm
t/01basic.t
t/02changelog.t
META.json 000664 001750 001750 11140 12403004676 13107 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012 {
"abstract" : "an object-oriented interface for DOAP (Description of a Project) data",
"author" : [
"Toby Inkster (TOBYINK) "
],
"dynamic_config" : 0,
"generated_by" : "Dist::Inkt::Profile::TOBYINK version 0.016, CPAN::Meta::Converter version 2.140640",
"keywords" : [],
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : "2"
},
"name" : "RDF-DOAP",
"no_index" : {
"directory" : [
"eg",
"examples",
"inc",
"t",
"xt"
]
},
"optional_features" : {},
"prereqs" : {
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "6.17"
}
},
"develop" : {
"recommends" : {
"Dist::Inkt" : "0.001"
}
},
"runtime" : {
"requires" : {
"Exporter::Tiny" : "0.026",
"JSON" : "2.00",
"List::MoreUtils" : "0",
"Moose" : "2.0600",
"MooseX::AttributeTags" : "0.001",
"RDF::Trine" : "1.000",
"Types::Standard" : "0.022",
"match::simple" : "0.001",
"perl" : "5.010"
}
},
"test" : {
"requires" : {
"Test::LongString" : "0",
"Test::More" : "0.96"
}
}
},
"provides" : {
"RDF::DOAP" : {
"file" : "lib/RDF/DOAP.pm",
"version" : "0.012"
},
"RDF::DOAP::Change" : {
"file" : "lib/RDF/DOAP/Change.pm",
"version" : "0.012"
},
"RDF::DOAP::Change::Addition" : {
"file" : "lib/RDF/DOAP/Change/Addition.pm",
"version" : "0.012"
},
"RDF::DOAP::Change::BackCompat" : {
"file" : "lib/RDF/DOAP/Change/BackCompat.pm",
"version" : "0.012"
},
"RDF::DOAP::Change::Bugfix" : {
"file" : "lib/RDF/DOAP/Change/Bugfix.pm",
"version" : "0.012"
},
"RDF::DOAP::Change::Documentation" : {
"file" : "lib/RDF/DOAP/Change/Documentation.pm",
"version" : "0.012"
},
"RDF::DOAP::Change::Packaging" : {
"file" : "lib/RDF/DOAP/Change/Packaging.pm",
"version" : "0.012"
},
"RDF::DOAP::Change::Regression" : {
"file" : "lib/RDF/DOAP/Change/Regression.pm",
"version" : "0.012"
},
"RDF::DOAP::Change::Removal" : {
"file" : "lib/RDF/DOAP/Change/Removal.pm",
"version" : "0.012"
},
"RDF::DOAP::Change::SecurityFix" : {
"file" : "lib/RDF/DOAP/Change/SecurityFix.pm",
"version" : "0.012"
},
"RDF::DOAP::Change::SecurityRegression" : {
"file" : "lib/RDF/DOAP/Change/SecurityRegression.pm",
"version" : "0.012"
},
"RDF::DOAP::Change::Tests" : {
"file" : "lib/RDF/DOAP/Change/Tests.pm",
"version" : "0.012"
},
"RDF::DOAP::Change::Update" : {
"file" : "lib/RDF/DOAP/Change/Update.pm",
"version" : "0.012"
},
"RDF::DOAP::ChangeSet" : {
"file" : "lib/RDF/DOAP/ChangeSet.pm",
"version" : "0.012"
},
"RDF::DOAP::Issue" : {
"file" : "lib/RDF/DOAP/Issue.pm",
"version" : "0.012"
},
"RDF::DOAP::Person" : {
"file" : "lib/RDF/DOAP/Person.pm",
"version" : "0.012"
},
"RDF::DOAP::Project" : {
"file" : "lib/RDF/DOAP/Project.pm",
"version" : "0.012"
},
"RDF::DOAP::Repository" : {
"file" : "lib/RDF/DOAP/Repository.pm",
"version" : "0.012"
},
"RDF::DOAP::Resource" : {
"file" : "lib/RDF/DOAP/Resource.pm",
"version" : "0.012"
},
"RDF::DOAP::Types" : {
"file" : "lib/RDF/DOAP/Types.pm",
"version" : "0.012"
},
"RDF::DOAP::Utils" : {
"file" : "lib/RDF/DOAP/Utils.pm",
"version" : "0.012"
},
"RDF::DOAP::Version" : {
"file" : "lib/RDF/DOAP/Version.pm",
"version" : "0.012"
}
},
"release_status" : "stable",
"resources" : {
"X_identifier" : "http://purl.org/NET/cpan-uri/dist/RDF-DOAP/project",
"bugtracker" : {
"web" : "http://rt.cpan.org/Dist/Display.html?Queue=RDF-DOAP"
},
"homepage" : "https://metacpan.org/release/RDF-DOAP",
"license" : [
"http://dev.perl.org/licenses/"
],
"repository" : {
"type" : "git",
"url" : "git://github.com/tobyink/p5-rdf-doap.git",
"web" : "https://github.com/tobyink/p5-rdf-doap"
}
},
"version" : "0.012"
}
META.yml 000664 001750 001750 5715 12403004676 12732 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012 ---
abstract: 'an object-oriented interface for DOAP (Description of a Project) data'
author:
- 'Toby Inkster (TOBYINK) '
build_requires:
Test::LongString: '0'
Test::More: '0.96'
configure_requires:
ExtUtils::MakeMaker: '6.17'
dynamic_config: 0
generated_by: 'Dist::Inkt::Profile::TOBYINK version 0.016, CPAN::Meta::Converter version 2.140640'
keywords: []
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: RDF-DOAP
no_index:
directory:
- eg
- examples
- inc
- t
- xt
optional_features: {}
provides:
RDF::DOAP:
file: lib/RDF/DOAP.pm
version: '0.012'
RDF::DOAP::Change:
file: lib/RDF/DOAP/Change.pm
version: '0.012'
RDF::DOAP::Change::Addition:
file: lib/RDF/DOAP/Change/Addition.pm
version: '0.012'
RDF::DOAP::Change::BackCompat:
file: lib/RDF/DOAP/Change/BackCompat.pm
version: '0.012'
RDF::DOAP::Change::Bugfix:
file: lib/RDF/DOAP/Change/Bugfix.pm
version: '0.012'
RDF::DOAP::Change::Documentation:
file: lib/RDF/DOAP/Change/Documentation.pm
version: '0.012'
RDF::DOAP::Change::Packaging:
file: lib/RDF/DOAP/Change/Packaging.pm
version: '0.012'
RDF::DOAP::Change::Regression:
file: lib/RDF/DOAP/Change/Regression.pm
version: '0.012'
RDF::DOAP::Change::Removal:
file: lib/RDF/DOAP/Change/Removal.pm
version: '0.012'
RDF::DOAP::Change::SecurityFix:
file: lib/RDF/DOAP/Change/SecurityFix.pm
version: '0.012'
RDF::DOAP::Change::SecurityRegression:
file: lib/RDF/DOAP/Change/SecurityRegression.pm
version: '0.012'
RDF::DOAP::Change::Tests:
file: lib/RDF/DOAP/Change/Tests.pm
version: '0.012'
RDF::DOAP::Change::Update:
file: lib/RDF/DOAP/Change/Update.pm
version: '0.012'
RDF::DOAP::ChangeSet:
file: lib/RDF/DOAP/ChangeSet.pm
version: '0.012'
RDF::DOAP::Issue:
file: lib/RDF/DOAP/Issue.pm
version: '0.012'
RDF::DOAP::Person:
file: lib/RDF/DOAP/Person.pm
version: '0.012'
RDF::DOAP::Project:
file: lib/RDF/DOAP/Project.pm
version: '0.012'
RDF::DOAP::Repository:
file: lib/RDF/DOAP/Repository.pm
version: '0.012'
RDF::DOAP::Resource:
file: lib/RDF/DOAP/Resource.pm
version: '0.012'
RDF::DOAP::Types:
file: lib/RDF/DOAP/Types.pm
version: '0.012'
RDF::DOAP::Utils:
file: lib/RDF/DOAP/Utils.pm
version: '0.012'
RDF::DOAP::Version:
file: lib/RDF/DOAP/Version.pm
version: '0.012'
requires:
Exporter::Tiny: '0.026'
JSON: '2.00'
List::MoreUtils: '0'
Moose: '2.0600'
MooseX::AttributeTags: '0.001'
RDF::Trine: '1.000'
Types::Standard: '0.022'
match::simple: '0.001'
perl: '5.010'
resources:
X_identifier: http://purl.org/NET/cpan-uri/dist/RDF-DOAP/project
bugtracker: http://rt.cpan.org/Dist/Display.html?Queue=RDF-DOAP
homepage: https://metacpan.org/release/RDF-DOAP
license: http://dev.perl.org/licenses/
repository: git://github.com/tobyink/p5-rdf-doap.git
version: '0.012'
Makefile.PL 000664 001750 001750 20334 12403004676 13445 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012 use strict;
use ExtUtils::MakeMaker 6.17;
my $EUMM = eval( $ExtUtils::MakeMaker::VERSION );
my $meta = {
"abstract" => "an object-oriented interface for DOAP (Description of a Project) data",
"author" => ["Toby Inkster (TOBYINK) "],
"dynamic_config" => 0,
"generated_by" => "Dist::Inkt::Profile::TOBYINK version 0.016, CPAN::Meta::Converter version 2.140640",
"keywords" => [],
"license" => ["perl_5"],
"meta-spec" => {
url => "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
version => 2,
},
"name" => "RDF-DOAP",
"no_index" => { directory => ["eg", "examples", "inc", "t", "xt"] },
"prereqs" => {
configure => { requires => { "ExtUtils::MakeMaker" => 6.17 } },
develop => { recommends => { "Dist::Inkt" => 0.001 } },
runtime => {
requires => {
"Exporter::Tiny" => 0.026,
"JSON" => "2.00",
"List::MoreUtils" => 0,
"match::simple" => 0.001,
"Moose" => "2.0600",
"MooseX::AttributeTags" => 0.001,
"perl" => "5.010",
"RDF::Trine" => "1.000",
"Types::Standard" => 0.022,
},
},
test => { requires => { "Test::LongString" => 0, "Test::More" => 0.96 } },
},
"provides" => {
"RDF::DOAP" => { file => "lib/RDF/DOAP.pm", version => 0.012 },
"RDF::DOAP::Change" => { file => "lib/RDF/DOAP/Change.pm", version => 0.012 },
"RDF::DOAP::Change::Addition" => { file => "lib/RDF/DOAP/Change/Addition.pm", version => 0.012 },
"RDF::DOAP::Change::BackCompat" => { file => "lib/RDF/DOAP/Change/BackCompat.pm", version => 0.012 },
"RDF::DOAP::Change::Bugfix" => { file => "lib/RDF/DOAP/Change/Bugfix.pm", version => 0.012 },
"RDF::DOAP::Change::Documentation" => { file => "lib/RDF/DOAP/Change/Documentation.pm", version => 0.012 },
"RDF::DOAP::Change::Packaging" => { file => "lib/RDF/DOAP/Change/Packaging.pm", version => 0.012 },
"RDF::DOAP::Change::Regression" => { file => "lib/RDF/DOAP/Change/Regression.pm", version => 0.012 },
"RDF::DOAP::Change::Removal" => { file => "lib/RDF/DOAP/Change/Removal.pm", version => 0.012 },
"RDF::DOAP::Change::SecurityFix" => { file => "lib/RDF/DOAP/Change/SecurityFix.pm", version => 0.012 },
"RDF::DOAP::Change::SecurityRegression" => {
file => "lib/RDF/DOAP/Change/SecurityRegression.pm",
version => 0.012,
},
"RDF::DOAP::Change::Tests" => { file => "lib/RDF/DOAP/Change/Tests.pm", version => 0.012 },
"RDF::DOAP::Change::Update" => { file => "lib/RDF/DOAP/Change/Update.pm", version => 0.012 },
"RDF::DOAP::ChangeSet" => { file => "lib/RDF/DOAP/ChangeSet.pm", version => 0.012 },
"RDF::DOAP::Issue" => { file => "lib/RDF/DOAP/Issue.pm", version => 0.012 },
"RDF::DOAP::Person" => { file => "lib/RDF/DOAP/Person.pm", version => 0.012 },
"RDF::DOAP::Project" => { file => "lib/RDF/DOAP/Project.pm", version => 0.012 },
"RDF::DOAP::Repository" => { file => "lib/RDF/DOAP/Repository.pm", version => 0.012 },
"RDF::DOAP::Resource" => { file => "lib/RDF/DOAP/Resource.pm", version => 0.012 },
"RDF::DOAP::Types" => { file => "lib/RDF/DOAP/Types.pm", version => 0.012 },
"RDF::DOAP::Utils" => { file => "lib/RDF/DOAP/Utils.pm", version => 0.012 },
"RDF::DOAP::Version" => { file => "lib/RDF/DOAP/Version.pm", version => 0.012 },
},
"release_status" => "stable",
"resources" => {
bugtracker => { web => "http://rt.cpan.org/Dist/Display.html?Queue=RDF-DOAP" },
homepage => "https://metacpan.org/release/RDF-DOAP",
license => ["http://dev.perl.org/licenses/"],
repository => {
type => "git",
url => "git://github.com/tobyink/p5-rdf-doap.git",
web => "https://github.com/tobyink/p5-rdf-doap",
},
X_identifier => "http://purl.org/NET/cpan-uri/dist/RDF-DOAP/project",
},
"version" => 0.012,
};
my %dynamic_config;
my %WriteMakefileArgs = (
ABSTRACT => $meta->{abstract},
AUTHOR => ($EUMM >= 6.5702 ? $meta->{author} : $meta->{author}[0]),
DISTNAME => $meta->{name},
VERSION => $meta->{version},
EXE_FILES => [ map $_->{file}, values %{ $meta->{x_provides_scripts} || {} } ],
NAME => do { my $n = $meta->{name}; $n =~ s/-/::/g; $n },
test => { TESTS => "t/*.t" },
%dynamic_config,
);
$WriteMakefileArgs{LICENSE} = $meta->{license}[0] if $EUMM >= 6.3001;
sub deps
{
my %r;
for my $stage (@_)
{
for my $dep (keys %{$meta->{prereqs}{$stage}{requires}})
{
next if $dep eq 'perl';
my $ver = $meta->{prereqs}{$stage}{requires}{$dep};
$r{$dep} = $ver if !exists($r{$dep}) || $ver >= $r{$dep};
}
}
\%r;
}
my ($build_requires, $configure_requires, $runtime_requires, $test_requires);
if ($EUMM >= 6.6303)
{
$WriteMakefileArgs{BUILD_REQUIRES} ||= deps('build');
$WriteMakefileArgs{CONFIGURE_REQUIRES} ||= deps('configure');
$WriteMakefileArgs{TEST_REQUIRES} ||= deps('test');
$WriteMakefileArgs{PREREQ_PM} ||= deps('runtime');
}
elsif ($EUMM >= 6.5503)
{
$WriteMakefileArgs{BUILD_REQUIRES} ||= deps('build', 'test');
$WriteMakefileArgs{CONFIGURE_REQUIRES} ||= deps('configure');
$WriteMakefileArgs{PREREQ_PM} ||= deps('runtime');
}
elsif ($EUMM >= 6.52)
{
$WriteMakefileArgs{CONFIGURE_REQUIRES} ||= deps('configure');
$WriteMakefileArgs{PREREQ_PM} ||= deps('runtime', 'build', 'test');
}
else
{
$WriteMakefileArgs{PREREQ_PM} ||= deps('configure', 'build', 'test', 'runtime');
}
{
my ($minperl) = reverse sort(
grep defined && /^[0-9]+(\.[0-9]+)?$/,
map $meta->{prereqs}{$_}{requires}{perl},
qw( configure build runtime )
);
if (defined($minperl))
{
die "Installing $meta->{name} requires Perl >= $minperl"
unless $] >= $minperl;
$WriteMakefileArgs{MIN_PERL_VERSION} ||= $minperl
if $EUMM >= 6.48;
}
}
sub FixMakefile
{
return unless -d 'inc';
my $file = shift;
local *MAKEFILE;
open MAKEFILE, "< $file" or die "FixMakefile: Couldn't open $file: $!; bailing out";
my $makefile = do { local $/; };
close MAKEFILE or die $!;
$makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /;
$makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g;
$makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g;
$makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m;
$makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m;
open MAKEFILE, "> $file" or die "FixMakefile: Couldn't open $file: $!; bailing out";
print MAKEFILE $makefile or die $!;
close MAKEFILE or die $!;
}
my $mm = WriteMakefile(%WriteMakefileArgs);
FixMakefile($mm->{FIRST_MAKEFILE} || 'Makefile');
exit(0);
README 000664 001750 001750 6505 12403004672 12333 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012 NAME
RDF::DOAP - an object-oriented interface for DOAP (Description of a
Project) data
SYNOPSIS
use feature 'say';
use RDF::DOAP;
my $url = 'http://api.metacpan.org/source/DOY/Moose-2.0604/doap.rdf';
my $doap = 'RDF::DOAP'->from_url($url);
my $proj = $doap->project;
say $proj->name; # "Moose"
say $_->name
for @{ $proj->maintainer };
DESCRIPTION
A little sparsely documented right now.
The RDF::DOAP class itself is mostly a wrapper for parsing RDF and
building objects. Most of the interesting stuff is in the "Bundled
Classes".
Constructors
`new(%attrs)`
You don't want to use this.
`from_url($url)`
Parse the RDF at the given URL and construct an RDF::DOAP object.
`from_file($fh, $base)`
Parse a file handle or file name. A base URL may be provided for
resolving relative URI references; if omitted the base is assumed to
be `http://localhost/` which is almost certainly wrong.
`from_model($model)`
Read DOAP from an existing RDF::Trine::Model.
Attributes
`projects`
An arrayref; the list of software projects found in the input data.
This cannot be provided in the constructor.
Methods
`project`
If `projects` contains only one project, returns it.
Otherwise, tries to guess which of the projects the input data was
mostly trying to describe.
Bundled Classes
Within each of these classes, the attributes correspond roughly to the
properties defined for them in the DOAP schema; however hyphens in
property URIs become underscores in attribute names.
RDF::DOAP::Resource
Correponds roughly to the *rdfs:Resource* class, excluding literals.
RDF::DOAP::Project
Correponds to *doap:Project*.
RDF::DOAP::Repository
Correponds to *doap:Repository*.
RDF::DOAP::Person
Correponds to *foaf:Person*.
RDF::DOAP::Version
Correponds to *doap:Version*.
RDF::DOAP::ChangeSet
Correponds to *dcs:ChangeSet*.
RDF::DOAP::Change
Correponds to *dcs:Change*.
RDF::DOAP::Issue
Correponds to *dbug:Issue*.
BUGS
Please report any bugs to
.
SEE ALSO
* Edd Dumbill's series of articles on DOAP's design: part 1
, part 2
, part 3
and part 4
* The DOAP Schema .
* The DOAP Change Sets Schema .
* The DOAP Bugs Schema .
AUTHOR
Toby Inkster .
COPYRIGHT AND LICENCE
This software is copyright (c) 2013 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under the
same terms as the Perl 5 programming language system itself.
DISCLAIMER OF WARRANTIES
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
SIGNATURE 000664 001750 001750 6703 12403004677 12744 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012 This file contains message digests of all files listed in MANIFEST,
signed via the Module::Signature module, version 0.73.
To verify the content in this distribution, first make sure you have
Module::Signature installed, then type:
% cpansign -v
It will check each file's integrity, as well as the signature's
validity. If "==> Signature verified OK! <==" is not displayed,
the distribution may already have been compromised, and you should
not run its Makefile.PL or Build.PL.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
SHA1 33317486c4fa2cf7fec85bf92ed38ac0f64233a0 CONTRIBUTING
SHA1 c1fbee6f7d0c6edd7036645fe874d80cb5fabe05 COPYRIGHT
SHA1 6bd7b17d81be63d08d4efa6cb80106e72887842c CREDITS
SHA1 28d23882d50e251637735c5ee54556a62eb3bc21 Changes
SHA1 c1ff8082c70be27ce35819ee08e7712b2e521414 INSTALL
SHA1 34f5e12514b91055de4b164a1f2327ef5c30ba53 LICENSE
SHA1 d1b46bbf847539765b0717caf468f1de9791ef1a MANIFEST
SHA1 d872c6456bbbaf46804af3c57fc6925b28b5b3bb META.json
SHA1 eda69d783e54c016a6d39b826a408118cf2cb2ce META.yml
SHA1 3ecaedc364cfbcde397ae42c44013394dfed637a Makefile.PL
SHA1 8b1b5f6a85a948a1b76f6d343670d08a2879cb29 README
SHA1 72ddfd0304a8e1c9bed4e1eb34cd1f010f9dc696 dist.ini
SHA1 f34b81607c5007762b6047c30dd77000b25fbcb6 doap.ttl
SHA1 4891c973c47a3e33389d6c91141e99eb796fcc87 examples/changelog.pl
SHA1 7725ba71ddd45085a21c7cbb30186e9fb3ea4d0c examples/credits.pl
SHA1 f37c95bd65b4b7f6a6671680e2385a09549f024b examples/gnome-data.pl
SHA1 f4a04524254b5695b5f35620d1de67462b712041 examples/moose-data.pl
SHA1 67a7f017978c49603c7542929e34cb8d62b067e2 examples/simple.pl
SHA1 75f28971d8b2ee728a27ece6b36389a3a1ea4ee3 lib/RDF/DOAP.pm
SHA1 2e9571509c9621e015beadbac68ed6a1c7019949 lib/RDF/DOAP/Change.pm
SHA1 ad5a6126b6f2774e290940540f8e37feac17da68 lib/RDF/DOAP/Change/Addition.pm
SHA1 4a6e1ace978a34ab4d75ab945d796c05d9e8cd72 lib/RDF/DOAP/Change/BackCompat.pm
SHA1 35674463a6aea21aa1a5a5960fb0b1ff6e3d246d lib/RDF/DOAP/Change/Bugfix.pm
SHA1 dc5e02cb9e46175aae0615f9aaa18473a01e934f lib/RDF/DOAP/Change/Documentation.pm
SHA1 7f2f587408f9bfdb93210d51ec01d1658a4f7278 lib/RDF/DOAP/Change/Packaging.pm
SHA1 2f31f74706ccb371e64726b4e6e4b2ca18dbea49 lib/RDF/DOAP/Change/Regression.pm
SHA1 1afdd40d267f38e6ed3db25d1706c4d0712ba2d2 lib/RDF/DOAP/Change/Removal.pm
SHA1 175fbbfe20cccfb64304580250095e89f62dc979 lib/RDF/DOAP/Change/SecurityFix.pm
SHA1 7921ba6edd0d4cfe7183bd36724015e4eb2a5fbd lib/RDF/DOAP/Change/SecurityRegression.pm
SHA1 92c8bcbeb8b6a08c9bce0de67f981cdb775942dd lib/RDF/DOAP/Change/Tests.pm
SHA1 71ffa664802298b7726e0c54dd06da395f1982b6 lib/RDF/DOAP/Change/Update.pm
SHA1 73860b7db9ea8784155616510ddf6069955d5b81 lib/RDF/DOAP/ChangeSet.pm
SHA1 9ae1c456fb5c6ea82e81b345f7db335fe70200c1 lib/RDF/DOAP/Issue.pm
SHA1 c18fb933bccdbbcf5ac041c9ba55b8cc01720428 lib/RDF/DOAP/Person.pm
SHA1 39c2eaa3f546b4f297ff9317519db68cfb285c8b lib/RDF/DOAP/Project.pm
SHA1 59a8f0a3ae63a12a6ad919a3c1ca62a580e6fab4 lib/RDF/DOAP/Repository.pm
SHA1 e1ea854976e593661146a3f185c04c43468c8f4a lib/RDF/DOAP/Resource.pm
SHA1 e5c748d3b25f3273eb89726362bb3ad173a52161 lib/RDF/DOAP/Types.pm
SHA1 36d5fe5c72c27c9835379786b250a0730750a485 lib/RDF/DOAP/Utils.pm
SHA1 3caa37bf79095abf0a47130f6d9e2e7b60e03b0f lib/RDF/DOAP/Version.pm
SHA1 dcb3f8a91230793abb2b1434c880be9d0bb9dab2 t/01basic.t
SHA1 5a326de5c4585e730714d3ab37411564285f5783 t/02changelog.t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iEYEARECAAYFAlQMCb8ACgkQzr+BKGoqfTl8QgCgh0iWR7lOR+ukPAJYFIewGb3s
hCQAnRag41Of/zsS8FsTviVD8PPIdwjk
=LEyu
-----END PGP SIGNATURE-----
dist.ini 000664 001750 001750 72 12403004672 13050 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012 ;;class='Dist::Inkt::Profile::TOBYINK'
;;name='RDF-DOAP'
doap.ttl 000664 001750 001750 23575 12403004675 13154 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012 @prefix dc: .
@prefix doap: .
@prefix doap-changeset: .
@prefix doap-deps: .
@prefix foaf: .
@prefix rdfs: .
@prefix xsd: .
dc:title "the same terms as the perl 5 programming language system itself".
a doap:Project;
dc:contributor ;
doap-deps:develop-recommendation [ doap-deps:on "Dist::Inkt 0.001"^^doap-deps:CpanId ];
doap-deps:runtime-requirement [
doap-deps:on "match::simple 0.001"^^doap-deps:CpanId;
], [ doap-deps:on "perl 5.010"^^doap-deps:CpanId ], [
doap-deps:on "Exporter::Tiny 0.026"^^doap-deps:CpanId;
], [
doap-deps:on "Types::Standard 0.022"^^doap-deps:CpanId;
], [ doap-deps:on "JSON 2.00"^^doap-deps:CpanId ], [ doap-deps:on "List::MoreUtils 0"^^doap-deps:CpanId ], [ doap-deps:on "Moose 2.0600"^^doap-deps:CpanId ], [
doap-deps:on "MooseX::AttributeTags 0.001"^^doap-deps:CpanId;
], [ doap-deps:on "RDF::Trine 1.000"^^doap-deps:CpanId ];
doap-deps:test-requirement [ doap-deps:on "Test::More 0.96"^^doap-deps:CpanId ], [ doap-deps:on "Test::LongString"^^doap-deps:CpanId ];
doap:bug-database ;
doap:created "2013-08-11"^^xsd:date;
doap:developer ;
doap:download-page ;
doap:homepage ;
doap:license ;
doap:maintainer ;
doap:name "RDF-DOAP";
doap:programming-language "Perl";
doap:release , , , , , , , , , , , ;
doap:repository [
a doap:GitRepository;
doap:browse ;
];
doap:shortdesc "an object-oriented interface for DOAP (Description of a Project) data".
a doap:Version;
rdfs:label "Initial release";
dc:identifier "RDF-DOAP-0.001"^^xsd:string;
dc:issued "2013-08-12"^^xsd:date;
doap-changeset:released-by ;
doap:file-release ;
doap:revision "0.001"^^xsd:string.
a doap:Version;
dc:identifier "RDF-DOAP-0.002"^^xsd:string;
dc:issued "2013-08-12"^^xsd:date;
doap-changeset:changeset [
doap-changeset:item [
a doap-changeset:Packaging;
rdfs:label "Various mini fixes.";
];
];
doap-changeset:released-by ;
doap:file-release ;
doap:revision "0.002"^^xsd:string.
a doap:Version;
dc:identifier "RDF-DOAP-0.003"^^xsd:string;
dc:issued "2013-08-13"^^xsd:date;
doap-changeset:changeset [
doap-changeset:item [
a doap-changeset:Addition;
rdfs:label "RDF::DOAP::Resource now has `rdf_get`, `rdf_get_literal` and `rdf_get_uri` methods.";
];
];
doap-changeset:released-by ;
doap:file-release ;
doap:revision "0.003"^^xsd:string.
a doap:Version;
dc:identifier "RDF-DOAP-0.004"^^xsd:string;
dc:issued "2013-08-13"^^xsd:date;
doap-changeset:changeset [
doap-changeset:item [
a doap-changeset:Bugfix;
rdfs:label "Fix `rdf_get`, `rdf_get_literal` and `rdf_get_uri` methods.";
], [
a doap-changeset:Change;
rdfs:label "Improved stringification for RDF::DOAP::Person.";
], [
a doap-changeset:Packaging;
rdfs:label "Add missing dep on Test::LongString.";
];
];
doap-changeset:released-by ;
doap:file-release ;
doap:revision "0.004"^^xsd:string.
a doap:Version;
dc:identifier "RDF-DOAP-0.005"^^xsd:string;
dc:issued "2013-08-13"^^xsd:date;
doap-changeset:changeset [
doap-changeset:item [
a doap-changeset:Bugfix;
rdfs:label "Further fix for `rdf_get`, `rdf_get_literal` and `rdf_get_uri` methods.";
];
];
doap-changeset:released-by ;
doap:file-release ;
doap:revision "0.005"^^xsd:string.
a doap:Version;
dc:identifier "RDF-DOAP-0.006"^^xsd:string;
dc:issued "2013-09-03"^^xsd:date;
doap-changeset:changeset [
doap-changeset:item [
a doap-changeset:Update;
rdfs:label "New roles added for dcs:BackCompat and dcs:Tests.";
], "Changed the generated changelogs to include groupings."^^doap-changeset:BackCompat;
];
doap-changeset:released-by ;
doap:file-release ;
doap:revision "0.006"^^xsd:string.
a doap:Version;
dc:identifier "RDF-DOAP-0.007"^^xsd:string;
dc:issued "2013-09-03"^^xsd:date;
doap-changeset:changeset [
doap-changeset:item [
a doap-changeset:Change;
rdfs:label "Make sure entries within changelog groups are lexicograpically sorted.";
], "Changed the generated changelogs yet again, to include 'RT' or 'GH' before issue numbers."^^doap-changeset:BackCompat;
];
doap-changeset:released-by ;
doap:file-release ;
doap:revision "0.007"^^xsd:string.
a doap:Version;
dc:identifier "RDF-DOAP-0.008"^^xsd:string;
dc:issued "2013-09-03"^^xsd:date;
doap-changeset:changeset [
doap-changeset:item [
a doap-changeset:Bugfix;
rdfs:label "Fix some 'uninitialized' warnings.";
];
];
doap-changeset:released-by ;
doap:file-release ;
doap:revision "0.008"^^xsd:string.
a doap:Version;
dc:identifier "RDF-DOAP-0.009"^^xsd:string;
dc:issued "2013-09-07"^^xsd:date;
doap-changeset:changeset [
doap-changeset:item [
a doap-changeset:Bugfix;
rdfs:label "Fix entries in changelog for changes with no explicit rdf:type.";
];
];
doap-changeset:released-by ;
doap:file-release ;
doap:revision "0.009"^^xsd:string.
a doap:Version;
dc:identifier "RDF-DOAP-0.010"^^xsd:string;
dc:issued "2013-09-30"^^xsd:date;
doap-changeset:changeset [
doap-changeset:item [
a doap-changeset:Bugfix;
rdfs:label "Use Exporter::Tiny instead of Exporter::TypeTiny.";
];
];
doap-changeset:released-by ;
doap:file-release ;
doap:revision "0.010"^^xsd:string.
a doap:Version;
dc:identifier "RDF-DOAP-0.011"^^xsd:string;
dc:issued "2014-08-12"^^xsd:date;
doap-changeset:changeset [
doap-changeset:item [
a doap-changeset:Bugfix;
rdfs:label "Don't import Types::Standard type constraints twice over.";
];
];
doap-changeset:released-by ;
doap:file-release ;
doap:revision "0.011"^^xsd:string.
a doap:Version;
dc:identifier "RDF-DOAP-0.012"^^xsd:string;
dc:issued "2014-09-07"^^xsd:date;
doap-changeset:changeset [
doap-changeset:item [
a doap-changeset:Bugfix;
rdfs:label "Prevent gather_objects from returning non-references.";
];
];
doap-changeset:released-by ;
doap:file-release ;
doap:revision "0.012"^^xsd:string.
a foaf:Person;
foaf:mbox ;
foaf:name "Toby Inkster";
foaf:nick "TOBYINK";
foaf:page .
changelog.pl 000664 001750 001750 335 12403004672 15530 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/examples use strict;
use warnings;
use RDF::DOAP;
my $url = 'http://api.metacpan.org/source/TOBYINK/MooseX-XSAccessor-0.005/doap.ttl';
my $doap = 'RDF::DOAP'->from_url($url);
my $proj = $doap->project;
print $proj->changelog;
credits.pl 000664 001750 001750 712 12403004672 15235 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/examples use strict;
use warnings;
use feature 'say';
use RDF::DOAP;
my $url = 'http://api.metacpan.org/source/TOBYINK/MooX-ClassAttribute-0.008/META.ttl';
my $doap = 'RDF::DOAP'->from_url($url);
my $proj = $doap->project;
say "==== MAINTAINERS ====";
say $_->to_string for $proj->gather_all_maintainers;
say "==== CONTRIBUTORS ====";
say $_->to_string for $proj->gather_all_contributors;
say "==== THANKS ====";
say $_->to_string for $proj->gather_all_thanks;
gnome-data.pl 000664 001750 001750 340 12403004672 15611 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/examples use strict;
use warnings;
use RDF::DOAP;
my $url = 'http://ftp.heanet.ie/mirrors/gnome/sources/banshee/banshee.doap#type=.rdf';
my $doap = 'RDF::DOAP'->from_url($url);
my $proj = $doap->project;
print $proj->dump_json;
moose-data.pl 000664 001750 001750 415 12403004672 15631 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/examples use strict;
use warnings;
use RDF::DOAP;
my $url = 'http://api.metacpan.org/source/DOY/Moose-2.0604/doap.rdf';
my $doap = 'RDF::DOAP'->from_url($url);
my $proj = $doap->project;
print($proj->name, "\n"); # Moose
print($_->name, "\n")
for @{ $proj->maintainer };
simple.pl 000664 001750 001750 340 12403004672 15066 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/examples use strict;
use warnings;
use RDF::DOAP;
my $url = 'http://api.metacpan.org/source/TOBYINK/MooX-ClassAttribute-0.008/META.ttl';
my $doap = 'RDF::DOAP'->from_url($url);
my $proj = $doap->project;
print $proj->dump_json;
01basic.t 000664 001750 001750 661 12403004672 13302 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/t =pod
=encoding utf-8
=head1 PURPOSE
Test that RDF::DOAP compiles.
=head1 AUTHOR
Toby Inkster Etobyink@cpan.orgE.
=head1 COPYRIGHT AND LICENCE
This software is copyright (c) 2013 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
use strict;
use warnings;
use Test::More;
use_ok('RDF::DOAP');
done_testing;
02changelog.t 000664 001750 001750 31400 12403004672 14204 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/t =pod
=encoding utf-8
=head1 PURPOSE
Parse some Turtle and create a changelog file.
On the surface this seems to just be testing a few methods, but under
the hood, an awful lot of stuff is getting done, and has to all come
together perfectly to produce the result.
=head1 AUTHOR
Toby Inkster Etobyink@cpan.orgE.
=head1 COPYRIGHT AND LICENCE
This software is copyright (c) 2013 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
use strict;
use warnings;
use Test::More;
use Test::LongString;
use RDF::DOAP;
use RDF::Trine;
my $model = 'RDF::Trine::Model'->temporary_model;
'RDF::Trine::Parser::Turtle'->new->parse_file_into_model('http://localhost/', \*DATA, $model);
my $proj = 'RDF::DOAP'->from_model($model)->project;
is_string($proj->changelog, <<'OUTPUT', 'changelog as expected'); done_testing;
MooX-ClassAttribute
===================
Created: 2012-12-27
Home page:
Bug tracker:
Maintainer: Toby Inkster (TOBYINK)
0.008 2013-07-10
[ Bug Fixes ]
- Support non-coderef defaults.
Fixes RT#87638.
Rob Bloodgood++
[ Packaging ]
- Switch to Dist::Inkt.
0.007 2013-07-10
[ Bug Fixes ]
- Fixed error: Can't call method "isa" on an undefined value at
MooX/CaptainHook.pm line 27.
Fixes RT#86828.
Dinis Rebolo++
[ Documentation ]
- Note incompatibility with Moo 1.001000.
0.006 2013-01-11
[ Bug Fixes ]
- Avoid triggering an 'in cleanup' error on some older versions of Perl.
0.005 2013-01-05
- Avoid triggering Sub::Exporter::Progressive's dependency on
Sub::Exporter.
0.004 2013-01-03
[ Bug Fixes ]
- Fix MooX::CaptainHook on_inflation fragility when Moose is loaded early.
0.003 2013-01-03
[ Bug Fixes ]
- Prevent MooX::CaptainHook from inadvertantly loading Moose.
0.002 2013-01-01
[ Packaging ]
- List dependencies.
0.001 2013-01-01 Initial release
OUTPUT
__DATA__
@prefix dc: .
@prefix doap: .
@prefix doap-bugs: .
@prefix doap-changeset: .
@prefix doap-deps: .
@prefix foaf: .
@prefix nfo: .
@prefix rdfs: .
@prefix xsd: .
dc:title "the same terms as the perl 5 programming language system itself".
a doap:Project;
dc:contributor ;
doap-deps:develop-requirement [
doap-deps:on "MooseX::ClassAttribute"^^doap-deps:CpanId;
];
doap-deps:runtime-recommendation [
doap-deps:on "MooseX::ClassAttribute"^^doap-deps:CpanId;
];
doap-deps:runtime-requirement [ doap-deps:on "Moo 1.000000"^^doap-deps:CpanId ], [
doap-deps:on "Role::Tiny 1.000000"^^doap-deps:CpanId;
], [
doap-deps:on "Sub::Exporter::Progressive"^^doap-deps:CpanId;
];
doap:bug-database ;
doap:created "2012-12-27"^^xsd:date;
doap:developer ;
doap:download-page ;
doap:homepage ;
doap:license ;
doap:maintainer ;
doap:name "MooX-ClassAttribute";
doap:programming-language "Perl";
doap:release , , , , , , , ;
doap:repository [
a doap:GitRepository;
doap:browse ;
];
doap:shortdesc "declare class attributes Moose-style... but without Moose".
a doap:Version;
rdfs:label "Initial release";
dc:identifier "MooX-ClassAttribute-0.001"^^xsd:string;
dc:issued "2013-01-01"^^xsd:date;
doap-changeset:released-by ;
doap:file-release ;
doap:revision "0.001"^^xsd:string.
a doap:Version;
dc:identifier "MooX-ClassAttribute-0.002"^^xsd:string;
dc:issued "2013-01-01"^^xsd:date;
doap-changeset:changeset [
doap-changeset:item [
a doap-changeset:Packaging;
rdfs:label "List dependencies.";
];
];
doap-changeset:released-by ;
doap:file-release ;
doap:revision "0.002"^^xsd:string.
a doap:Version;
dc:identifier "MooX-ClassAttribute-0.003"^^xsd:string;
dc:issued "2013-01-03"^^xsd:date;
doap-changeset:changeset [
doap-changeset:item [
a doap-changeset:Bugfix;
rdfs:label "Prevent MooX::CaptainHook from inadvertantly loading Moose.";
];
];
doap-changeset:released-by ;
doap:file-release ;
doap:revision "0.003"^^xsd:string.
a doap:Version;
dc:identifier "MooX-ClassAttribute-0.004"^^xsd:string;
dc:issued "2013-01-03"^^xsd:date;
doap-changeset:changeset [
doap-changeset:item [
a doap-changeset:Bugfix;
rdfs:label "Fix MooX::CaptainHook on_inflation fragility when Moose is loaded early.";
];
];
doap-changeset:released-by ;
doap:file-release ;
doap:revision "0.004"^^xsd:string.
a doap:Version;
dc:identifier "MooX-ClassAttribute-0.005"^^xsd:string;
dc:issued "2013-01-05"^^xsd:date;
doap-changeset:changeset [
doap-changeset:item [
rdfs:label "Avoid triggering Sub::Exporter::Progressive's dependency on Sub::Exporter.";
];
];
doap-changeset:released-by ;
doap:file-release ;
doap:revision "0.005"^^xsd:string.
a doap:Version;
dc:identifier "MooX-ClassAttribute-0.006"^^xsd:string;
dc:issued "2013-01-11"^^xsd:date;
doap-changeset:changeset [
doap-changeset:item [
a doap-changeset:Bugfix;
rdfs:label "Avoid triggering an 'in cleanup' error on some older versions of Perl.";
];
];
doap-changeset:released-by ;
doap:file-release ;
doap:revision "0.006"^^xsd:string.
a doap:Version;
dc:identifier "MooX-ClassAttribute-0.007"^^xsd:string;
dc:issued "2013-07-10"^^xsd:date;
doap-changeset:changeset [
doap-changeset:item [
a doap-changeset:Bugfix;
rdfs:label "Fixed error: Can't call method \"isa\" on an undefined value at MooX/CaptainHook.pm line 27.";
doap-changeset:blame ;
doap-changeset:fixes ;
], [
a doap-changeset:Documentation;
rdfs:label "Note incompatibility with Moo 1.001000.";
];
];
doap-changeset:released-by ;
doap:file-release ;
doap:revision "0.007"^^xsd:string.
a doap:Version;
dc:identifier "MooX-ClassAttribute-0.008"^^xsd:string;
dc:issued "2013-07-10"^^xsd:date;
doap-changeset:changeset [
doap-changeset:item [
a doap-changeset:Packaging;
rdfs:label "Switch to Dist::Inkt.";
], [
a doap-changeset:Bugfix;
rdfs:label "Support non-coderef defaults.";
doap-changeset:fixes ;
doap-changeset:thanks [
a foaf:Person;
foaf:mbox ;
foaf:name "Rob Bloodgood";
];
];
];
doap-changeset:released-by ;
doap:file-release ;
doap:revision "0.008"^^xsd:string.
a foaf:Person;
foaf:name "Dinis Rebolo";
foaf:nick "DREBOLO";
foaf:page .
a foaf:Person;
foaf:name "Lukas Mai";
foaf:nick "MAUKE";
foaf:page .
a foaf:Person;
foaf:mbox ;
foaf:name "Toby Inkster";
foaf:nick "TOBYINK";
foaf:page .
a doap-bugs:Issue;
doap-bugs:id "86828"^^xsd:string;
doap-bugs:page ;
doap-bugs:reporter .
a doap-bugs:Issue;
doap-bugs:id "87638"^^xsd:string;
doap-bugs:page .
[]
a nfo:FileDataObject;
dc:license ;
dc:rightsHolder ;
nfo:fileName "meta/people.pret".
[]
a nfo:FileDataObject, nfo:TextDocument;
dc:license ;
dc:rightsHolder ;
dc:source [
a nfo:FileDataObject, nfo:SourceCode;
rdfs:label "MooX::ClassAttribute";
nfo:fileName "lib/MooX/ClassAttribute.pm";
nfo:programmingLanguage "Perl";
];
nfo:fileName "README".
[]
a nfo:FileDataObject, nfo:TextDocument;
dc:license ;
dc:rightsHolder ;
dc:source [
a nfo:FileDataObject;
nfo:fileName "meta/changes.pret";
];
nfo:fileName "Changes".
[]
a nfo:FileDataObject, nfo:SourceCode;
dc:license ;
dc:rightsHolder ;
nfo:fileName "Makefile.PL";
nfo:programmingLanguage "Perl".
[]
a nfo:FileDataObject;
dc:license ;
dc:rightsHolder ;
nfo:fileName "meta/changes.pret".
[]
a nfo:FileDataObject;
dc:license ;
dc:rightsHolder ;
nfo:fileName "meta/copyright.pret".
[]
a nfo:FileDataObject;
dc:license ;
dc:rightsHolder ;
nfo:fileName "meta/doap.pret".
[]
a nfo:FileDataObject;
dc:license ;
dc:rightsHolder ;
nfo:fileName "meta/makefile.pret".
DOAP.pm 000664 001750 001750 12261 12403004672 13731 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/lib/RDF use 5.010;
use strict;
use warnings;
package RDF::DOAP;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.012';
use Moose;
extends 'RDF::DOAP::Resource';
use RDF::Trine;
use RDF::DOAP::Project;
use RDF::DOAP::Types -types;
use RDF::Trine::Namespace qw(rdf rdfs owl xsd);
my $doap = 'RDF::Trine::Namespace'->new('http://usefulinc.com/ns/doap#');
has projects => (
is => 'ro',
isa => ArrayRef[Project],
default => sub { [] },
coerce => 1,
init_arg => '_projects',
);
sub from_url
{
require RDF::Trine;
my $class = shift;
my ($url) = @_;
my $model = 'RDF::Trine::Model'->new;
'RDF::Trine::Parser'->parse_url_into_model("$url", $model);
return $class->from_model($model, { rdf_about => $url });
}
sub from_file
{
require RDF::Trine;
my $class = shift;
my ($fh, $base) = @_;
$base //= 'http://localhost/';
my $model = 'RDF::Trine::Model'->new;
'RDF::Trine::Parser'->parse_file_into_model($base, $fh, $model);
return $class->from_model($model);
}
sub from_model
{
my $class = shift;
my ($model, $args) = @_;
# required for coercion to work!
local $RDF::DOAP::Resource::MODEL = $model;
$class->new(
%{ $args || {} },
rdf_model => $model,
_projects => [ $model->subjects($rdf->type, $doap->Project) ],
);
}
sub project
{
my $self = shift;
my @projects = @{$self->projects};
return $projects[0] if @projects <= 1;
my @sorted =
map $_->[0],
sort { $b->[1] <=> $a->[1] }
map [
$_,
$_->has_rdf_model && $_->has_rdf_about
? $_->rdf_model->count_statements($_->rdf_about, undef, undef)
: 0
], @projects;
return $sorted[0];
}
1;
__END__
=pod
=encoding utf-8
=begin stopwords
rdfs:Resource
doap:Project
doap:Repository
foaf:Person
doap:Version
dcs:ChangeSet
dcs:Change
dbug:Issue
=end stopwords
=head1 NAME
RDF::DOAP - an object-oriented interface for DOAP (Description of a Project) data
=head1 SYNOPSIS
use feature 'say';
use RDF::DOAP;
my $url = 'http://api.metacpan.org/source/DOY/Moose-2.0604/doap.rdf';
my $doap = 'RDF::DOAP'->from_url($url);
my $proj = $doap->project;
say $proj->name; # "Moose"
say $_->name
for @{ $proj->maintainer };
=head1 DESCRIPTION
A little sparsely documented right now.
The RDF::DOAP class itself is mostly a wrapper for parsing RDF
and building objects. Most of the interesting stuff is in the
L.
=head2 Constructors
=over
=item C<< new(%attrs) >>
You don't want to use this.
=item C<< from_url($url) >>
Parse the RDF at the given URL and construct an RDF::DOAP object.
=item C<< from_file($fh, $base) >>
Parse a file handle or file name. A base URL may be provided for
resolving relative URI references; if omitted the base is assumed
to be C<< http://localhost/ >> which is almost certainly wrong.
=item C<< from_model($model) >>
Read DOAP from an existing L.
=back
=head2 Attributes
=over
=item C<< projects >>
An arrayref; the list of software projects found in the input data.
This cannot be provided in the constructor.
=back
=head2 Methods
=over
=item C<< project >>
If C<< projects >> contains only one project, returns it.
Otherwise, tries to guess which of the projects the input data was
mostly trying to describe.
=back
=head2 Bundled Classes
Within each of these classes, the attributes correspond roughly to
the properties defined for them in the DOAP schema; however hyphens
in property URIs become underscores in attribute names.
=over
=item B<< L >>
Correponds roughly to the I<< rdfs:Resource >> class, excluding
literals.
=item B<< L >>
Correponds to I<< doap:Project >>.
=item B<< L >>
Correponds to I<< doap:Repository >>.
=item B<< L >>
Correponds to I<< foaf:Person >>.
=item B<< L >>
Correponds to I<< doap:Version >>.
=item B<< L >>
Correponds to I<< dcs:ChangeSet >>.
=item B<< L >>
Correponds to I<< dcs:Change >>.
=item B<< L >>
Correponds to I<< dbug:Issue >>.
=back
=head1 BUGS
Please report any bugs to
L.
=head1 SEE ALSO
=over
=item *
Edd Dumbill's series of articles on DOAP's design:
L,
L,
L and
L
=item *
L.
=item *
L.
=item *
L.
=back
=head1 AUTHOR
Toby Inkster Etobyink@cpan.orgE.
=head1 COPYRIGHT AND LICENCE
This software is copyright (c) 2013 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=head1 DISCLAIMER OF WARRANTIES
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Change.pm 000664 001750 001750 4713 12403004672 15101 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/lib/RDF/DOAP package RDF::DOAP::Change;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.012';
use Moose;
extends qw(RDF::DOAP::Resource);
use RDF::DOAP::Person;
use RDF::DOAP::Types -types;
use RDF::DOAP::Utils -traits;
use List::MoreUtils qw(uniq);
use Text::Wrap qw(wrap);
use RDF::Trine::Namespace qw(rdf rdfs owl xsd);
my $doap = 'RDF::Trine::Namespace'->new('http://usefulinc.com/ns/doap#');
my $dc = 'RDF::Trine::Namespace'->new('http://purl.org/dc/terms/');
my $dcs = 'RDF::Trine::Namespace'->new('http://ontologi.es/doap-changeset#');
has blame => (
traits => [ WithURI, Gathering ],
is => 'ro',
isa => ArrayRef[Person],
coerce => 1,
uri => $dcs->blame,
multi => 1,
gather_as => ['contributor'],
);
has thanks => (
traits => [ WithURI, Gathering ],
is => 'ro',
isa => ArrayRef[Person],
coerce => 1,
uri => $dcs->thanks,
multi => 1,
gather_as => ['thanks'],
);
our %ROLES = (
$dcs->Addition => 'RDF::DOAP::Change::Addition',
$dcs->Removal => 'RDF::DOAP::Change::Removal',
$dcs->Bugfix => 'RDF::DOAP::Change::Bugfix',
$dcs->Update => 'RDF::DOAP::Change::Update',
$dcs->Regression => 'RDF::DOAP::Change::Regression',
$dcs->Documentation => 'RDF::DOAP::Change::Documentation',
$dcs->Packaging => 'RDF::DOAP::Change::Packaging',
$dcs->SecurityFix => 'RDF::DOAP::Change::SecurityFix',
$dcs->SecurityRegression => 'RDF::DOAP::Change::SecurityRegression',
);
sub BUILD
{
my $self = shift;
my @roles = grep defined, map $ROLES{$_}, @{ $self->rdf_type || [] };
push @roles, $ROLES{$dcs->Bugfix}
if $self->has_rdf_about
&& $self->has_rdf_model
&& $self->rdf_model->count_statements($self->rdf_about, $dcs->fixes, undef);
$self->Moose::Util::apply_all_roles(uniq @roles) if @roles;
}
sub changelog_entry
{
my $self = shift;
my $text = join "\n", $self->changelog_lines;
wrap(" - ", " ", $text);
}
sub changelog_lines
{
my $self = shift;
my ($notype) = @_;
my @lines;
if ($notype)
{
@lines = $self->label;
}
else
{
my @type = sort map $_->uri =~ m{(\w+)$}, @{ $self->rdf_type };
@lines = "(@type) " . $self->label;
}
for my $person (uniq sort @{$self->blame||[]}, @{$self->thanks||[]})
{
push @lines, sprintf("%s++", $person->to_string('compact'));
}
push @lines, $self->changelog_links;
return @lines;
}
sub changelog_links
{
my $self = shift;
return @{ $self->see_also || [] };
}
1;
ChangeSet.pm 000664 001750 001750 1254 12403004672 15552 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/lib/RDF/DOAP package RDF::DOAP::ChangeSet;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.012';
use Moose;
extends qw(RDF::DOAP::Resource);
use RDF::DOAP::ChangeSet;
use RDF::DOAP::Change;
use RDF::DOAP::Types -types;
use RDF::DOAP::Utils -traits;
use RDF::Trine::Namespace qw(rdf rdfs owl xsd);
my $doap = 'RDF::Trine::Namespace'->new('http://usefulinc.com/ns/doap#');
my $dc = 'RDF::Trine::Namespace'->new('http://purl.org/dc/terms/');
my $dcs = 'RDF::Trine::Namespace'->new('http://ontologi.es/doap-changeset#');
has items => (
traits => [ WithURI ],
is => 'ro',
isa => ArrayRef[Change],
coerce => 1,
uri => $dcs->item,
multi => 1,
);
1;
Issue.pm 000664 001750 001750 2236 12403004672 15002 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/lib/RDF/DOAP package RDF::DOAP::Issue;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.012';
use Moose;
extends qw(RDF::DOAP::Resource);
use RDF::DOAP::Types -types;
use RDF::DOAP::Utils -traits;
use RDF::Trine::Namespace qw(rdf rdfs owl xsd);
my $dbug = 'RDF::Trine::Namespace'->new('http://ontologi.es/doap-bugs#');
has reporter => (
traits => [ WithURI, Gathering ],
is => 'ro',
isa => ArrayRef[ Person ],
coerce => 1,
uri => $dbug->reporter,
multi => 1,
gather_as => ['thanks'],
);
has assignee => (
traits => [ WithURI, Gathering ],
is => 'ro',
isa => ArrayRef[ Person ],
coerce => 1,
uri => $dbug->assignee,
multi => 1,
gather_as => ['contributor'],
);
has id => (
traits => [ WithURI ],
is => 'ro',
isa => String,
coerce => 1,
uri => $dbug->id,
);
has $_ => (
traits => [ WithURI ],
is => 'ro',
isa => Identifier,
coerce => 1,
uri => $dbug->$_,
) for qw( severity status );
has page => (
traits => [ WithURI ],
is => 'ro',
isa => Identifier,
coerce => 1,
uri => $dbug->page,
);
1;
Person.pm 000664 001750 001750 3750 12403004672 15162 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/lib/RDF/DOAP package RDF::DOAP::Person;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.012';
use Moose;
extends qw(RDF::DOAP::Resource);
use overload
q[""] => sub { shift->to_string },
fallback => 1;
use RDF::DOAP::Types -types;
use RDF::DOAP::Utils -traits;
use RDF::Trine::Namespace qw(rdf rdfs owl xsd);
my $foaf = 'RDF::Trine::Namespace'->new('http://xmlns.com/foaf/0.1/');
has $_ => (
traits => [ WithURI ],
is => 'ro',
isa => String,
coerce => 1,
uri => $foaf->$_,
) for qw( name nick );
has mbox => (
traits => [ WithURI ],
is => 'ro',
isa => ArrayRef[Identifier],
coerce => 1,
uri => $foaf->mbox,
multi => 1,
lazy => 1,
builder => '_build_mbox',
);
has cpanid => (
is => 'ro',
isa => Maybe[Str],
lazy => 1,
builder => '_build_cpanid',
);
sub _build_cpanid
{
my $self = shift;
return unless $self->has_rdf_about;
return unless $self->rdf_about->is_resource;
$self->rdf_about->uri =~ m{^http://purl\.org/NET/cpan-uri/person/(\w+)$}
and return $1;
return;
}
sub _build_mbox
{
my $self = shift;
return [sprintf('mailto:%s@cpan.org', $self->cpanid)]
if defined $self->cpanid;
return [];
}
sub to_string
{
my $self = shift;
return $self->name
|| $self->nick
|| $self->cpanid
|| ($self->mbox && $self->mbox->[0]->uri)
|| ($self->rdf_about && $self->rdf_about->uri)
|| 'Anonymous'
if @_ && $_[0] eq 'compact';
my @parts;
if ($self->name)
{
push @parts, $self->name;
if ($self->cpanid)
{
push @parts, sprintf('(%s)', uc $self->cpanid);
}
}
else
{
my $nick = uc($self->nick) || uc($self->cpanid);
push @parts, $nick if $nick;
}
for my $mbox (@{$self->mbox})
{
if ($mbox and $mbox->uri =~ /^mailto:(.+)$/)
{
push @parts, "<$1>";
last;
}
}
for my $mbox (@{$self->mbox})
{
push @parts, $mbox if !@parts;
}
push @parts, $self->rdf_about if !@parts && $self->has_rdf_about;
join(" ", grep !!$_, @parts) or 'Anonymous';
}
1;
Project.pm 000664 001750 001750 7224 12403004672 15322 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/lib/RDF/DOAP package RDF::DOAP::Project;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.012';
use Moose;
extends qw(RDF::DOAP::Resource);
use RDF::DOAP::Person;
use RDF::DOAP::Version;
use RDF::DOAP::Repository;
use RDF::DOAP::Types -types;
use RDF::DOAP::Utils -traits;
use RDF::Trine::Namespace qw(rdf rdfs owl xsd);
my $doap = 'RDF::Trine::Namespace'->new('http://usefulinc.com/ns/doap#');
has $_ => (
traits => [ WithURI ],
is => 'ro',
isa => String,
coerce => 1,
uri => do { (my $x = $_) =~ s/_/-/g; $doap->$x },
) for qw(name shortdesc created description programming_language os );
has release => (
traits => [ WithURI ],
is => 'ro',
isa => ArrayRef[Version],
coerce => 1,
uri => $doap->release,
multi => 1,
);
has $_ => (
traits => [ WithURI, Gathering ],
is => 'ro',
isa => ArrayRef[Person],
coerce => 1,
multi => 1,
uri => $doap->$_,
gather_as => ['maintainer'],
) for qw( maintainer );
has $_ => (
traits => [ WithURI, Gathering ],
is => 'ro',
isa => ArrayRef[Person],
coerce => 1,
multi => 1,
uri => $doap->$_,
gather_as => ['contributor'],
) for qw( developer documenter );
has $_ => (
traits => [ WithURI, Gathering ],
is => 'ro',
isa => ArrayRef[Person],
coerce => 1,
multi => 1,
uri => $doap->$_,
gather_as => ['thanks'],
) for qw( translator tester helper );
has $_ => (
traits => [ WithURI ],
is => 'ro',
isa => Identifier,
coerce => 1,
uri => do { (my $x = $_) =~ s/_/-/g; $doap->$x },
) for qw( wiki bug_database mailing_list download_page );
has $_ => (
traits => [ WithURI ],
is => 'ro',
isa => ArrayRef[Identifier],
coerce => 1,
uri => do { (my $x = $_) =~ s/_/-/g; $doap->$x },
multi => 1,
) for qw( homepage old_homepage license download_mirror screenshots category );
has repository => (
traits => [ WithURI ],
is => 'ro',
isa => ArrayRef[Repository],
coerce => 1,
multi => 1,
uri => $doap->repository,
);
sub rdf_load_all
{
my $class = shift;
my ($model) = @_;
map $class->rdf_load($_, $model), $model->subjects($rdf->type, $doap->Project);
}
sub gather_all_maintainers
{
require RDF::DOAP::Utils;
my $self = shift;
RDF::DOAP::Utils::gather_objects($self, 'maintainer');
}
sub gather_all_contributors
{
require RDF::DOAP::Utils;
my $self = shift;
RDF::DOAP::Utils::gather_objects($self, 'contributor');
}
sub gather_all_thanks
{
require RDF::DOAP::Utils;
my $self = shift;
RDF::DOAP::Utils::gather_objects($self, 'thanks');
}
sub sorted_releases
{
my $self = shift;
my @rels = sort {
($a->revision and $b->revision and version->parse($a->revision) cmp version->parse($b->revision)) or
($a->issued and $b->issued and $a->issued cmp $b->issued) or
($a->rdf_about and $b->rdf_about and $a->rdf_about->as_ntriples cmp $b->rdf_about->as_ntriples)
} @{$self->release};
return \@rels;
}
sub changelog
{
my $self = shift;
return join "\n",
$self->_changelog_header,
map($_->changelog_section, reverse @{ $self->sorted_releases });
}
sub _changelog_header
{
my $self = shift;
my @lines = (
$self->name,
("=" x length($self->name)),
"",
);
push @lines, sprintf('%-14s%s', "$_->[0]:", $_->[1])
for grep defined($_->[1]), (
["Created" => $self->created],
map(["Home page"=>$_], @{$self->homepage||[]}),
["Bug tracker" => $self->bug_database],
["Wiki" => $self->wiki],
["Mailing list" => $self->mailing_list],
map(["Maintainer"=>$_->to_string], @{$self->maintainer||[]}),
);
return join("\n", @lines)."\n";
}
1;
Repository.pm 000664 001750 001750 1304 12403004672 16064 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/lib/RDF/DOAP package RDF::DOAP::Repository;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.012';
use Moose;
extends qw(RDF::DOAP::Resource);
use RDF::DOAP::Types -types;
use RDF::DOAP::Utils -traits;
use RDF::Trine::Namespace qw(rdf rdfs owl xsd);
my $doap = 'RDF::Trine::Namespace'->new('http://usefulinc.com/ns/doap#');
has $_ => (
traits => [ WithURI ],
is => 'ro',
isa => Identifier,
coerce => 1,
uri => do { (my $x = $_) =~ s/_/-/g; $doap->$x },
) for qw( browse location );
has $_ => (
traits => [ WithURI ],
is => 'ro',
isa => String,
coerce => 1,
uri => do { (my $x = $_) =~ s/_/-/g; $doap->$x },
) for qw( anon_root module );
1;
Resource.pm 000664 001750 001750 7136 12403004672 15505 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/lib/RDF/DOAP package RDF::DOAP::Resource;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.012';
use Moose;
use Carp;
use RDF::DOAP::Types -types;
use RDF::DOAP::Utils -traits;
use Scalar::Util qw( weaken refaddr );
use RDF::Trine::Namespace qw(rdf rdfs owl xsd);
has rdf_about => (
is => 'ro',
isa => Identifier,
coerce => 1,
predicate => 'has_rdf_about',
);
has rdf_model => (
is => 'ro',
isa => Model,
predicate => 'has_rdf_model',
);
has rdf_type => (
traits => [ WithURI ],
is => 'ro',
isa => ArrayRef[Identifier],
coerce => 1,
uri => $rdf->type,
multi => 1,
default => sub { [] },
);
has $_ => (
traits => [ WithURI ],
is => 'ro',
isa => String,
coerce => 1,
uri => $rdfs->$_,
) for qw( label comment );
has see_also => (
traits => [ WithURI ],
is => 'ro',
isa => ArrayRef[Identifier],
coerce => 1,
uri => $rdfs->seeAlso,
multi => 1,
lazy => 1,
default => sub {
my $self = shift;
if ($self->has_rdf_about && $self->rdf_about =~ /^tdb:[^:]*:(.*)$/)
{
return [ Identifier->coerce($1) ];
}
return [];
},
);
our $MODEL;
my %objects;
sub rdf_load
{
my $class = shift;
my $identifier = Identifier->assert_coerce( $_[0] );
my $model = $_[1] ? Model->assert_return( $_[1] ) : $MODEL or die;
return $objects{ refaddr($model) }{ $identifier }
if $objects{ refaddr($model) }{ $identifier };
my (%attr, %multi);
for my $a ($class->meta->get_all_attributes)
{
$a->does(WithURI) or next;
$attr{ $a->uri } = $a->init_arg || $a->name;
$multi{ $a->uri } = $a->multi;
}
my %args = (
rdf_about => $identifier,
rdf_model => $model,
);
my $iter = $model->get_statements($identifier, undef, undef);
while (my $st = $iter->next)
{
my $name = $attr{ $st->predicate } or next;
if ($multi{ $st->predicate })
{
push @{ $args{$name} ||= [] }, $st->object;
}
else
{
$args{$name} ||= $st->object;
}
}
local $MODEL = $model;
my $self = $objects{ refaddr($model) }{ $identifier } = $class->new(%args);
weaken($objects{ refaddr($model) }{ $identifier });
return $self;
}
sub rdf_get
{
my $self = shift;
croak "This object cannot rdf_get; stopped"
unless $self->has_rdf_model && $self->has_rdf_about;
my @values = $self->rdf_model->objects_for_predicate_list($self->rdf_about, @_);
wantarray ? @values : $values[0];
}
sub rdf_get_literal
{
my $self = shift;
my @values = grep $_->is_literal, $self->rdf_get(@_);
wantarray ? @values : $values[0];
}
sub rdf_get_uri
{
my $self = shift;
my @values = grep $_->is_resource, $self->rdf_get(@_);
wantarray ? @values : $values[0];
}
sub TO_JSON
{
my $self = shift;
$self->fixes if $self->can('fixes');
my $hash = +{ %$self };
delete $hash->{$_} for qw( rdf_about rdf_model );
for my $k (keys %$hash) {
if (blessed $hash->{$k} and $hash->{$k}->isa('RDF::Trine::Node')) {
$hash->{$k} = $hash->{$k}->as_ntriples;
}
if (ref $hash->{$k} eq 'ARRAY') {
$hash->{$k} = [ map {
(blessed $_ and $_->isa('RDF::Trine::Node')) ? $_->as_ntriples : $_
} @{ $hash->{$k} } ];
}
}
$hash->{'@'} = $self->rdf_about->as_ntriples if $self->has_rdf_about;
# $hash->{__ISA__} = [ $self->meta->linearized_isa ];
# $hash->{__DOES__} = [ map $_->name, $self->meta->calculate_all_roles_with_inheritance ];
return $hash;
}
sub dump_json
{
require JSON;
JSON::to_json(
shift(),
{ pretty => 1, canonical => 1, convert_blessed => 1 },
);
}
sub isa
{
my $self = shift;
return grep($_[0]->equal($_), @{$self->rdf_type})
if Identifier->check(@_);
$self->SUPER::isa(@_);
}
1;
Types.pm 000664 001750 001750 1730 12403004672 15014 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/lib/RDF/DOAP package RDF::DOAP::Types;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.012';
use Type::Utils -all;
use Type::Library -base;
use Types::TypeTiny qw(StringLike);
BEGIN { extends 'Types::Standard' };
declare 'Identifier',
as InstanceOf["RDF::Trine::Node"];
coerce 'Identifier',
from Str, q{ /^_:(.+)$/ ? 'RDF::Trine::Node::Blank'->new($1) : 'RDF::Trine::Node::Resource'->new($_) },
from HasMethods['rdf_about'], q{ $_->rdf_about },
from StringLike, q{ /^_:(.+)$/ ? 'RDF::Trine::Node::Blank'->new("$1") : 'RDF::Trine::Node::Resource'->new("$_") };
declare 'String',
as Str;
coerce 'String',
from InstanceOf["RDF::Trine::Node::Literal"], q{ $_->literal_value },
from StringLike, q{"$_"};
class_type 'Model', { class => 'RDF::Trine::Model' };
for my $class (qw/ Project Version Change ChangeSet Person Issue Repository /)
{
declare $class,
as InstanceOf[ "RDF::DOAP::$class" ];
coerce $class,
from 'Identifier', qq{ "RDF::DOAP::$class"->rdf_load(\$_) };
}
1;
Utils.pm 000664 001750 001750 2732 12403004672 15013 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/lib/RDF/DOAP package RDF::DOAP::Utils;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.012';
use strict;
use warnings;
use RDF::DOAP::Types -types;
use match::simple 'match';
use List::MoreUtils 'uniq';
use MooseX::AttributeTags (
WithURI => [
uri => [ is => 'ro', isa => Identifier, coerce => 1, required => 1 ],
multi => [ is => 'ro', isa => Bool, default => 0 ],
],
Gathering => [
gather_as => [ is => 'ro', isa => ArrayRef[Str], default => sub { [] } ],
],
);
use Exporter::Tiny ();
our @ISA = qw( Exporter::Tiny );
our @EXPORT_OK = qw( WithURI Gathering );
our %EXPORT_TAGS = (
traits => [qw( WithURI Gathering )]
);
our %seen;
sub _gather_objects
{
my ($self, $relation) = @_;
return if $seen{$self}++;
if (ArrayRef->check($self))
{
return uniq(
grep defined, map _gather_objects($_, $relation), grep defined, @$self
);
}
if (Object->check($self))
{
return unless $self->isa('Moose::Object');
my @local =
grep defined,
map ArrayRef->check($_) ? @$_ : $_,
map $_->get_value($self),
grep $_->does(Gathering) && match($relation, $_->gather_as),
$self->meta->get_all_attributes;
my @recursive =
grep defined,
map _gather_objects($_, $relation),
grep defined,
map $_->get_value($self),
grep !($_->does(Gathering) && match($relation, $_->gather_as)),
$self->meta->get_all_attributes;
return uniq(@local, @recursive);
}
}
sub gather_objects
{
local %seen;
grep ref, _gather_objects(@_);
}
1;
Version.pm 000664 001750 001750 7535 12403004672 15346 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/lib/RDF/DOAP package RDF::DOAP::Version;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.012';
use Moose;
extends qw(RDF::DOAP::Resource);
use RDF::DOAP::ChangeSet;
use RDF::DOAP::Change;
use RDF::DOAP::Person;
use RDF::DOAP::Types -types;
use RDF::DOAP::Utils -traits;
use List::MoreUtils qw(uniq);
use Text::Wrap qw(wrap);
use RDF::Trine::Namespace qw(rdf rdfs owl xsd);
my $doap = 'RDF::Trine::Namespace'->new('http://usefulinc.com/ns/doap#');
my $dc = 'RDF::Trine::Namespace'->new('http://purl.org/dc/terms/');
my $dcs = 'RDF::Trine::Namespace'->new('http://ontologi.es/doap-changeset#');
has $_ => (
traits => [ WithURI ],
is => 'ro',
isa => String,
coerce => 1,
uri => $doap->$_,
) for qw( revision name branch );
has issued => (
traits => [ WithURI ],
is => 'ro',
isa => String,
coerce => 1,
uri => $dc->issued,
);
has changesets => (
traits => [ WithURI ],
is => 'ro',
isa => ArrayRef[ChangeSet],
coerce => 1,
uri => $dcs->changeset,
multi => 1,
trigger => sub { $_[0]->clear_changes },
);
has changes => (
is => 'ro',
isa => ArrayRef[Change],
coerce => 1,
lazy => 1,
builder => '_build_changes',
clearer => 'clear_changes',
);
has released_by => (
traits => [ WithURI, Gathering ],
is => 'ro',
isa => Person,
coerce => 1,
uri => $dcs->uri('released-by'),
gather_as => ['maintainer'],
);
has _changelog_subsections => (
is => 'ro',
isa => ArrayRef[ArrayRef],
lazy => 1,
builder => '_build_changelog_subsections',
);
sub _build_changes
{
my $self = shift;
[ map { @{$_->items} } @{$self->changesets || []} ];
}
sub changelog_section
{
my $self = shift;
my @ss = @{ $self->_changelog_subsections };
if (@ss == 1 and $ss[0][0] eq 'Other')
{
# If there's only an "Other" section, then avoid
# printing a section header for it.
return join(
"\n",
$self->_changelog_section_header,
map {
my ($head, @lines) = @$_;
(sort(@lines), '');
} @ss,
);
}
return join(
"\n",
$self->_changelog_section_header,
map {
my ($head, @lines) = @$_;
(" [ $head ]", sort(@lines), '');
} @ss,
);
}
sub _changelog_section_header
{
my $self = shift;
return join(
"\t",
grep(
defined,
$self->revision,
($self->issued // 'Unknown'),
($self->name // $self->label),
),
) . "\n";
}
sub _subsection_order
{
my $self = shift;
uniq(map $_->[1], $self->_subsection_classification);
}
sub _subsection_classification
{
(
[$dcs->SecurityFix => 'SECURITY', 'Fix'],
[$dcs->SecurityRegression => 'SECURITY', 'Regression'],
[$dcs->BackCompat => 'BACK COMPAT'],
[$dcs->Regression => 'REGRESSIONS'],
[$dcs->Bugfix => 'Bug Fixes'],
[$dcs->Documentation => 'Documentation'],
[$dcs->Tests => 'Test Suite'],
[$dcs->Packaging => 'Packaging'],
[$dcs->Addition => 'Other', 'Added'],
[$dcs->Removal => 'Other', 'Removed'],
[$dcs->Update => 'Other', 'Updated'],
[$dcs->Change => 'Other'],
);
}
sub _build_changelog_subsections
{
my $self = shift;
my %sections;
my @classifications = $self->_subsection_classification;
for my $ch (@{ $self->changes })
{
my $found_section;
for my $class (@classifications)
{
my ($type, $section, $tag) = @$class;
if ( $ch->isa($type) )
{
my $text = join "\n", $ch->changelog_lines(1);
$text = "$tag: $text" if $tag;
push @{ $sections{$section} }, wrap(" - ", " ", $text);
$found_section++;
last;
}
}
unless ($found_section)
{
my $text = join "\n", $ch->changelog_lines(1);
push @{ $sections{Other} }, wrap(" - ", " ", $text);
}
}
return [
map { exists($sections{$_}) ? [$_, @{$sections{$_}}] : (); }
$self->_subsection_order
];
}
1;
Addition.pm 000664 001750 001750 167 12403004672 16613 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/lib/RDF/DOAP/Change package RDF::DOAP::Change::Addition;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.012';
use Moose::Role;
1;
BackCompat.pm 000664 001750 001750 171 12403004672 17057 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/lib/RDF/DOAP/Change package RDF::DOAP::Change::BackCompat;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.012';
use Moose::Role;
1;
Bugfix.pm 000664 001750 001750 2646 12403004672 16330 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/lib/RDF/DOAP/Change package RDF::DOAP::Change::Bugfix;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.012';
use Moose::Role;
requires qw( rdf_about rdf_model );
use RDF::DOAP::Issue;
use RDF::DOAP::Types -types;
use RDF::Trine::Namespace qw(rdf rdfs owl xsd);
my $doap = 'RDF::Trine::Namespace'->new('http://usefulinc.com/ns/doap#');
my $dc = 'RDF::Trine::Namespace'->new('http://purl.org/dc/terms/');
my $dcs = 'RDF::Trine::Namespace'->new('http://ontologi.es/doap-changeset#');
has fixes => (
is => 'ro',
isa => ArrayRef[Issue],
coerce => 1,
lazy => 1,
builder => '_build_fixes',
);
sub _build_fixes
{
my $self = shift;
return [] unless $self->has_rdf_about;
return [] unless $self->has_rdf_model;
my $model = $self->rdf_model;
[ map 'RDF::DOAP::Issue'->rdf_load($_, $model), $model->objects($self->rdf_about, $dcs->fixes) ];
}
override changelog_links => sub
{
my $self = shift;
my @pages = map {
my $bug = $_;
grep defined, $bug->page, @{ $bug->see_also || [] };
} @{ $self->fixes };
return (@pages, super());
};
my %ABBREV = (
GITHUB => 'GH',
RT => 'RT',
);
override changelog_lines => sub
{
my $self = shift;
my @lines = super();
my @added = map {
!defined($_->id) ? () :
($_->rdf_about =~ /\b(RT|GITHUB)\b/i) ? "Fixes $ABBREV{uc($1)}#$_->{id}." :
"Fixes #$_->{id}."
} @{ $self->fixes };
splice(@lines, 1, 0, @added) if @added;
return @lines;
};
1;
Documentation.pm 000664 001750 001750 174 12403004672 17667 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/lib/RDF/DOAP/Change package RDF::DOAP::Change::Documentation;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.012';
use Moose::Role;
1;
Packaging.pm 000664 001750 001750 170 12403004672 16736 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/lib/RDF/DOAP/Change package RDF::DOAP::Change::Packaging;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.012';
use Moose::Role;
1;
Regression.pm 000664 001750 001750 171 12403004672 17173 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/lib/RDF/DOAP/Change package RDF::DOAP::Change::Regression;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.012';
use Moose::Role;
1;
Removal.pm 000664 001750 001750 166 12403004672 16464 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/lib/RDF/DOAP/Change package RDF::DOAP::Change::Removal;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.012';
use Moose::Role;
1;
SecurityFix.pm 000664 001750 001750 172 12403004672 17332 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/lib/RDF/DOAP/Change package RDF::DOAP::Change::SecurityFix;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.012';
use Moose::Role;
1;
SecurityRegression.pm 000664 001750 001750 201 12403004672 20715 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/lib/RDF/DOAP/Change package RDF::DOAP::Change::SecurityRegression;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.012';
use Moose::Role;
1;
Tests.pm 000664 001750 001750 164 12403004672 16157 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/lib/RDF/DOAP/Change package RDF::DOAP::Change::Tests;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.012';
use Moose::Role;
1;
Update.pm 000664 001750 001750 165 12403004672 16300 0 ustar 00tai tai 000000 000000 RDF-DOAP-0.012/lib/RDF/DOAP/Change package RDF::DOAP::Change::Update;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.012';
use Moose::Role;
1;