COPYRIGHT000644001750001750 374713217022230 14153 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: RDF-DOAP Upstream-Contact: Kjetil Kjernsmo (KJETILK) and Toby Inkster (TOBYINK) Source: https://metacpan.org/release/RDF-DOAP Files: Changes META.json META.yml dist.ini 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 2017 Kjetil Kjernsmo and Toby Inkster. License: GPL-1.0+ or Artistic-1.0 Files: INSTALL LICENSE examples/changelog.pl examples/credits.pl examples/gnome-data.pl examples/moose-data.pl examples/simple.pl Copyright: Unknown License: Unknown Files: COPYRIGHT CREDITS SIGNATURE Copyright: None License: public-domain Files: README README.pod lib/RDF/DOAP.pm Copyright: This software is copyright (c) 2013 by Toby Inkster, 2017 by Kjetil Kjernsmo. License: GPL-1.0+ or Artistic-1.0 Files: 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: Makefile.PL Copyright: Copyright 2013 Toby Inkster. License: GPL-1.0+ or Artistic-1.0 License: Artistic-1.0 This software is Copyright (c) 2017 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) 2017 by the copyright holder(s). This is free software, licensed under: The GNU General Public License, Version 1, February 1989 CREDITS000644001750001750 15013217022227 13647 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100Maintainer: - Kjetil Kjernsmo (KJETILK) - Toby Inkster (TOBYINK) Changes000644001750001750 304313217022227 14146 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100RDF-DOAP ======== Created: 2013-08-11 Home page: Bug tracker: Maintainer: Toby Inkster (TOBYINK) Maintainer: Kjetil Kjernsmo (KJETILK) 0.100 2017-12-21 - Added: RDF::DOAP::Project now has methods for foras. - Replace List::MoreUtils with List::Util. - Some minor changes. 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 INSTALL000644001750001750 164613217022227 13713 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100 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 LICENSE000644001750001750 4375113217022227 13712 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100This software is copyright (c) 2017 by Kjetil Kjernsmo and 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) 2017 by Kjetil Kjernsmo and 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) 2017 by Kjetil Kjernsmo and 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 MANIFEST000644001750001750 156413217022230 14004 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100COPYRIGHT CREDITS Changes INSTALL LICENSE MANIFEST META.json META.yml Makefile.PL README README.pod 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.json000644001750001750 1142613217022230 14312 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100{ "abstract" : "an object-oriented interface for DOAP (Description of a Project) data", "author" : [ "Toby Inkster (TOBYINK) ", "Kjetil Kjernsmo (KJETILK) " ], "dynamic_config" : 0, "generated_by" : "Dist::Inkt::Profile::TOBYINK version 0.024, CPAN::Meta::Converter version 2.150010", "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::Util" : "1.45", "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.100" }, "RDF::DOAP::Change" : { "file" : "lib/RDF/DOAP/Change.pm", "version" : "0.100" }, "RDF::DOAP::Change::Addition" : { "file" : "lib/RDF/DOAP/Change/Addition.pm", "version" : "0.100" }, "RDF::DOAP::Change::BackCompat" : { "file" : "lib/RDF/DOAP/Change/BackCompat.pm", "version" : "0.100" }, "RDF::DOAP::Change::Bugfix" : { "file" : "lib/RDF/DOAP/Change/Bugfix.pm", "version" : "0.100" }, "RDF::DOAP::Change::Documentation" : { "file" : "lib/RDF/DOAP/Change/Documentation.pm", "version" : "0.100" }, "RDF::DOAP::Change::Packaging" : { "file" : "lib/RDF/DOAP/Change/Packaging.pm", "version" : "0.100" }, "RDF::DOAP::Change::Regression" : { "file" : "lib/RDF/DOAP/Change/Regression.pm", "version" : "0.100" }, "RDF::DOAP::Change::Removal" : { "file" : "lib/RDF/DOAP/Change/Removal.pm", "version" : "0.100" }, "RDF::DOAP::Change::SecurityFix" : { "file" : "lib/RDF/DOAP/Change/SecurityFix.pm", "version" : "0.100" }, "RDF::DOAP::Change::SecurityRegression" : { "file" : "lib/RDF/DOAP/Change/SecurityRegression.pm", "version" : "0.100" }, "RDF::DOAP::Change::Tests" : { "file" : "lib/RDF/DOAP/Change/Tests.pm", "version" : "0.100" }, "RDF::DOAP::Change::Update" : { "file" : "lib/RDF/DOAP/Change/Update.pm", "version" : "0.100" }, "RDF::DOAP::ChangeSet" : { "file" : "lib/RDF/DOAP/ChangeSet.pm", "version" : "0.100" }, "RDF::DOAP::Issue" : { "file" : "lib/RDF/DOAP/Issue.pm", "version" : "0.100" }, "RDF::DOAP::Person" : { "file" : "lib/RDF/DOAP/Person.pm", "version" : "0.100" }, "RDF::DOAP::Project" : { "file" : "lib/RDF/DOAP/Project.pm", "version" : "0.100" }, "RDF::DOAP::Repository" : { "file" : "lib/RDF/DOAP/Repository.pm", "version" : "0.100" }, "RDF::DOAP::Resource" : { "file" : "lib/RDF/DOAP/Resource.pm", "version" : "0.100" }, "RDF::DOAP::Types" : { "file" : "lib/RDF/DOAP/Types.pm", "version" : "0.100" }, "RDF::DOAP::Utils" : { "file" : "lib/RDF/DOAP/Utils.pm", "version" : "0.100" }, "RDF::DOAP::Version" : { "file" : "lib/RDF/DOAP/Version.pm", "version" : "0.100" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/kjetilk/p5-rdf-doap/issues" }, "homepage" : "https://metacpan.org/release/RDF-DOAP", "license" : [ "http://dev.perl.org/licenses/" ], "repository" : { "type" : "git", "url" : "git://github.com/kjetilk/p5-rdf-doap.git", "web" : "https://github.com/kjetilk/p5-rdf-doap" }, "x_IRC" : "irc://irc.perl.org/#perlrdf", "x_identifier" : "http://purl.org/NET/cpan-uri/dist/RDF-DOAP/project" }, "version" : "0.100", "x_serialization_backend" : "JSON::PP version 2.27300_01", "x_static_install" : 1 } META.yml000644001750001750 614713217022230 14126 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100--- abstract: 'an object-oriented interface for DOAP (Description of a Project) data' author: - 'Toby Inkster (TOBYINK) ' - 'Kjetil Kjernsmo (KJETILK) ' 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.024, CPAN::Meta::Converter version 2.150010' 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.100' RDF::DOAP::Change: file: lib/RDF/DOAP/Change.pm version: '0.100' RDF::DOAP::Change::Addition: file: lib/RDF/DOAP/Change/Addition.pm version: '0.100' RDF::DOAP::Change::BackCompat: file: lib/RDF/DOAP/Change/BackCompat.pm version: '0.100' RDF::DOAP::Change::Bugfix: file: lib/RDF/DOAP/Change/Bugfix.pm version: '0.100' RDF::DOAP::Change::Documentation: file: lib/RDF/DOAP/Change/Documentation.pm version: '0.100' RDF::DOAP::Change::Packaging: file: lib/RDF/DOAP/Change/Packaging.pm version: '0.100' RDF::DOAP::Change::Regression: file: lib/RDF/DOAP/Change/Regression.pm version: '0.100' RDF::DOAP::Change::Removal: file: lib/RDF/DOAP/Change/Removal.pm version: '0.100' RDF::DOAP::Change::SecurityFix: file: lib/RDF/DOAP/Change/SecurityFix.pm version: '0.100' RDF::DOAP::Change::SecurityRegression: file: lib/RDF/DOAP/Change/SecurityRegression.pm version: '0.100' RDF::DOAP::Change::Tests: file: lib/RDF/DOAP/Change/Tests.pm version: '0.100' RDF::DOAP::Change::Update: file: lib/RDF/DOAP/Change/Update.pm version: '0.100' RDF::DOAP::ChangeSet: file: lib/RDF/DOAP/ChangeSet.pm version: '0.100' RDF::DOAP::Issue: file: lib/RDF/DOAP/Issue.pm version: '0.100' RDF::DOAP::Person: file: lib/RDF/DOAP/Person.pm version: '0.100' RDF::DOAP::Project: file: lib/RDF/DOAP/Project.pm version: '0.100' RDF::DOAP::Repository: file: lib/RDF/DOAP/Repository.pm version: '0.100' RDF::DOAP::Resource: file: lib/RDF/DOAP/Resource.pm version: '0.100' RDF::DOAP::Types: file: lib/RDF/DOAP/Types.pm version: '0.100' RDF::DOAP::Utils: file: lib/RDF/DOAP/Utils.pm version: '0.100' RDF::DOAP::Version: file: lib/RDF/DOAP/Version.pm version: '0.100' requires: Exporter::Tiny: '0.026' JSON: '2.00' List::Util: '1.45' Moose: '2.0600' MooseX::AttributeTags: '0.001' RDF::Trine: '1.000' Types::Standard: '0.022' match::simple: '0.001' perl: '5.010' resources: IRC: irc://irc.perl.org/#perlrdf Identifier: http://purl.org/NET/cpan-uri/dist/RDF-DOAP/project bugtracker: https://github.com/kjetilk/p5-rdf-doap/issues homepage: https://metacpan.org/release/RDF-DOAP license: http://dev.perl.org/licenses/ repository: git://github.com/kjetilk/p5-rdf-doap.git version: '0.100' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' x_static_install: 1 Makefile.PL000644001750001750 2131713217022230 14643 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100use 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) ", "Kjetil Kjernsmo (KJETILK) ", ], "dynamic_config" => 0, "generated_by" => "Dist::Inkt::Profile::TOBYINK version 0.024, CPAN::Meta::Converter version 2.150010", "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::Util" => 1.45, "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.100" }, "RDF::DOAP::Change" => { file => "lib/RDF/DOAP/Change.pm", version => "0.100" }, "RDF::DOAP::Change::Addition" => { file => "lib/RDF/DOAP/Change/Addition.pm", version => "0.100" }, "RDF::DOAP::Change::BackCompat" => { file => "lib/RDF/DOAP/Change/BackCompat.pm", version => "0.100" }, "RDF::DOAP::Change::Bugfix" => { file => "lib/RDF/DOAP/Change/Bugfix.pm", version => "0.100" }, "RDF::DOAP::Change::Documentation" => { file => "lib/RDF/DOAP/Change/Documentation.pm", version => "0.100" }, "RDF::DOAP::Change::Packaging" => { file => "lib/RDF/DOAP/Change/Packaging.pm", version => "0.100" }, "RDF::DOAP::Change::Regression" => { file => "lib/RDF/DOAP/Change/Regression.pm", version => "0.100" }, "RDF::DOAP::Change::Removal" => { file => "lib/RDF/DOAP/Change/Removal.pm", version => "0.100" }, "RDF::DOAP::Change::SecurityFix" => { file => "lib/RDF/DOAP/Change/SecurityFix.pm", version => "0.100" }, "RDF::DOAP::Change::SecurityRegression" => { file => "lib/RDF/DOAP/Change/SecurityRegression.pm", version => "0.100", }, "RDF::DOAP::Change::Tests" => { file => "lib/RDF/DOAP/Change/Tests.pm", version => "0.100" }, "RDF::DOAP::Change::Update" => { file => "lib/RDF/DOAP/Change/Update.pm", version => "0.100" }, "RDF::DOAP::ChangeSet" => { file => "lib/RDF/DOAP/ChangeSet.pm", version => "0.100" }, "RDF::DOAP::Issue" => { file => "lib/RDF/DOAP/Issue.pm", version => "0.100" }, "RDF::DOAP::Person" => { file => "lib/RDF/DOAP/Person.pm", version => "0.100" }, "RDF::DOAP::Project" => { file => "lib/RDF/DOAP/Project.pm", version => "0.100" }, "RDF::DOAP::Repository" => { file => "lib/RDF/DOAP/Repository.pm", version => "0.100" }, "RDF::DOAP::Resource" => { file => "lib/RDF/DOAP/Resource.pm", version => "0.100" }, "RDF::DOAP::Types" => { file => "lib/RDF/DOAP/Types.pm", version => "0.100" }, "RDF::DOAP::Utils" => { file => "lib/RDF/DOAP/Utils.pm", version => "0.100" }, "RDF::DOAP::Version" => { file => "lib/RDF/DOAP/Version.pm", version => "0.100" }, }, "release_status" => "stable", "resources" => { bugtracker => { web => "https://github.com/kjetilk/p5-rdf-doap/issues" }, homepage => "https://metacpan.org/release/RDF-DOAP", license => ["http://dev.perl.org/licenses/"], repository => { type => "git", url => "git://github.com/kjetilk/p5-rdf-doap.git", web => "https://github.com/kjetilk/p5-rdf-doap", }, x_identifier => "http://purl.org/NET/cpan-uri/dist/RDF-DOAP/project", x_IRC => "irc://irc.perl.org/#perlrdf", }, "version" => "0.100", "x_static_install" => 1, }; 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); README000644001750001750 657413217022227 13547 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100NAME 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 . Kjetil Kjernsmo . COPYRIGHT AND LICENCE This software is copyright (c) 2013 by Toby Inkster, 2017 by Kjetil Kjernsmo. 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. README.pod000644001750001750 1236013217022227 14336 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100use 5.010; use strict; use warnings; package RDF::DOAP; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; 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. Kjetil Kjernsmo Ekjetilk@cpan.orgE. =head1 COPYRIGHT AND LICENCE This software is copyright (c) 2013 by Toby Inkster, 2017 by Kjetil Kjernsmo. 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. SIGNATURE000644001750001750 1011713217022230 14151 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100This file contains message digests of all files listed in MANIFEST, signed via the Module::Signature module, version 0.81. 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: SHA256 SHA1 9effa34a26fd4f65b559e55c4fcf3ce61e36cf5b COPYRIGHT SHA1 bb0bfc2ab454eef85345e9edf18f4d09be22dc64 CREDITS SHA1 72f11e5e4197e3622a6b5fd7209b9201c2b80bdb Changes SHA1 c1ff8082c70be27ce35819ee08e7712b2e521414 INSTALL SHA1 1afd04fac8d7ac4c1394adc84336667e82af1717 LICENSE SHA1 ac21cce68cb9398f97c3ddb1cfdff72680934375 MANIFEST SHA1 649e678a22e56c98bb33019106622627181c7527 META.json SHA1 f6b9c5d03313eacc341387ff77c0a9594ffd6532 META.yml SHA1 6ce084738e5a3456dfa1bd11e90ea8bd9a93c538 Makefile.PL SHA1 d129b4995bd45c7c888d73a76ea8ec2ebf711c16 README SHA1 7663300011b2aab441a0632345e0558bb7ad093d README.pod SHA1 72ddfd0304a8e1c9bed4e1eb34cd1f010f9dc696 dist.ini SHA1 b7e32c5f0527f27d29ab04509ce7f9e976672b00 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 7663300011b2aab441a0632345e0558bb7ad093d lib/RDF/DOAP.pm SHA1 628155a27611f51fccc2096258b641dea9fbd565 lib/RDF/DOAP/Change.pm SHA1 614391daa31ad91cd58fd3acecdb239a5c752a3a lib/RDF/DOAP/Change/Addition.pm SHA1 57cfadfb75cde5fb168af873d9a7438e590c0115 lib/RDF/DOAP/Change/BackCompat.pm SHA1 98cceddf36a25abb5d69e87b9eaaed5816178d88 lib/RDF/DOAP/Change/Bugfix.pm SHA1 a13614dda934a87fe84e4e184c4a7d650ae42b91 lib/RDF/DOAP/Change/Documentation.pm SHA1 6f1e5037b6da61869910502f32bb4eda22b3e6df lib/RDF/DOAP/Change/Packaging.pm SHA1 076712af6bf80ad937514e1312aab404ab91641c lib/RDF/DOAP/Change/Regression.pm SHA1 74954af6997381b2361bddafee96baacf7702ad9 lib/RDF/DOAP/Change/Removal.pm SHA1 0e35ade64aa95cc63fe66c2aa46b57beeae528f9 lib/RDF/DOAP/Change/SecurityFix.pm SHA1 7d84ad52b5ffa4552fa2ac2bf56e01ffc76fa933 lib/RDF/DOAP/Change/SecurityRegression.pm SHA1 db64562812c9259bd9e9f27e490c16b60869b1d6 lib/RDF/DOAP/Change/Tests.pm SHA1 72f791c670d6437fb26796759494390985797bc8 lib/RDF/DOAP/Change/Update.pm SHA1 ded577a6cf5430466d1caaefd68baf53ad7b5b40 lib/RDF/DOAP/ChangeSet.pm SHA1 ad19a597a15262485cf90bfbad73e64335ff872f lib/RDF/DOAP/Issue.pm SHA1 c6c460bb6b107484730dda648d558856a4ee8361 lib/RDF/DOAP/Person.pm SHA1 7f385dee380fd4c68340b722dd3414a431314afe lib/RDF/DOAP/Project.pm SHA1 9741e748cef497ee27bb710a94848ef297552672 lib/RDF/DOAP/Repository.pm SHA1 68beaf36240172678ed2285e9d564d381e3cea35 lib/RDF/DOAP/Resource.pm SHA1 034e6d27dfc5b4721e06abca6969e05fd7317de4 lib/RDF/DOAP/Types.pm SHA1 6dee6ec9d9988ff9cf77d5f81310f92e7fafd667 lib/RDF/DOAP/Utils.pm SHA1 4f21f9dbaa346c888aa13d47e671a62fbb7457e1 lib/RDF/DOAP/Version.pm SHA1 dcb3f8a91230793abb2b1434c880be9d0bb9dab2 t/01basic.t SHA1 5a326de5c4585e730714d3ab37411564285f5783 t/02changelog.t -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEDsyLxtCi6bk7pBcmf77o3zqeSqUFAlo8JJgACgkQf77o3zqe SqV1kRAAqR9piVfS+EbLsxfvJnxx9S2JEANeQMMEEtP0M3zyo496VphF2tTVnf1f jRfAmJwHEBWQNu87iJcvRVI5d1aulVSQkgb4/xDln7pLrA5EmgkMZExxvZ4RLVt6 91K/n8lKZ2AOyWFMNmjMcGmIv9xBarS5Hw0RTeBRNYv3t6uh04qcSORKuqP4S1lM 8XbdYnAFavFnBUrQrMgfs9ydTGR3VTDHgZ7BA5PYrtVLfVz+fQClXue5Rdotexnl oN3yx3z+ZSmHvtNxTYUGOUxJBWWsPgdluckBW9WQjtjX3CtsYa2aXHMtK7vvBzdm iw46rvNtye73PsSbdCSsNexQrtRRwPwC9jyH0pNAKdxVdAg9J0N5a9n78GRIsliy mLYmNQGz89ylt/+/YeUCWU4Op5RKuomZY8oSNDPXHw2jfSj2AW3mV+G0A8U8t+Ah ppeKrpYFVwd8i+Zfrw7q/UUvTkY+SbUQ/3ZEYpF40JCxmdTlYK7Cy0BSrJFOzAvC iwpV1iWHd3OaZgKZNAlpYpQ0Qy1G0v9hDpFjYYL7BcHxpPH8RMPY/XouOPZNP4FO LUBWXaTvhAZPXJvFC1CRx434r8vvf7s+xs1Z98Fbr6iefuLzm/534D1NM+TvrDIh CduQtpCqxKFEndk72e6W4lqQ/nxAX3v6oxqddJlb1um6cN0ZAd0= =/AR9 -----END PGP SIGNATURE----- dist.ini000644001750001750 7213217022227 14256 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100;;class='Dist::Inkt::Profile::TOBYINK' ;;name='RDF-DOAP' doap.ttl000644001750001750 4463513217022230 14351 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100_:r1513890962r0 a ; "Various mini fixes." . _:r1513890962r1 a ; "RDF::DOAP::Resource now has `rdf_get`, `rdf_get_literal` and `rdf_get_uri` methods." . _:r1513890962r10 a ; "Use Exporter::Tiny instead of Exporter::TypeTiny." . _:r1513890962r11 a ; "Don't import Types::Standard type constraints twice over." . _:r1513890962r12 a ; "Prevent gather_objects from returning non-references." . _:r1513890962r13 a ; "Replace List::MoreUtils with List::Util." . _:r1513890962r14 a ; "RDF::DOAP::Project now has methods for foras." . _:r1513890962r15 a ; "Some minor changes." . _:r1513890962r2 a ; "Fix `rdf_get`, `rdf_get_literal` and `rdf_get_uri` methods." . _:r1513890962r3 a ; "Improved stringification for RDF::DOAP::Person." . _:r1513890962r4 a ; "Add missing dep on Test::LongString." . _:r1513890962r5 a ; "Further fix for `rdf_get`, `rdf_get_literal` and `rdf_get_uri` methods." . _:r1513890962r6 a ; "New roles added for dcs:BackCompat and dcs:Tests." . _:r1513890962r7 a ; "Make sure entries within changelog groups are lexicograpically sorted." . _:r1513890962r8 a ; "Fix some 'uninitialized' warnings." . _:r1513890962r9 a ; "Fix entries in changelog for changes with no explicit rdf:type." . _:rb5fc40458708e460eb4b0fcd1ef00c702r0 ; a ; . _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r0 "Test::More 0.96"^^ . _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r1 "Test::LongString"^^ . _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r10 "match::simple 0.001"^^ . _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r11 "perl 5.010"^^ . _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r2 "Dist::Inkt 0.001"^^ . _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r3 "Exporter::Tiny 0.026"^^ . _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r4 "Types::Standard 0.022"^^ . _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r5 "JSON 2.00"^^ . _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r6 "List::Util 1.45"^^ . _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r7 "Moose 2.0600"^^ . _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r8 "MooseX::AttributeTags 0.001"^^ . _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r9 "RDF::Trine 1.000"^^ . _:rbde447b38bad54935877bad6475504b5fr0 _:r1513890962r0 . _:rbde447b38bad54935877bad6475504b5fr1 _:r1513890962r1 . _:rbde447b38bad54935877bad6475504b5fr10 _:r1513890962r12 . _:rbde447b38bad54935877bad6475504b5fr11 _:r1513890962r13, _:r1513890962r14, _:r1513890962r15 . _:rbde447b38bad54935877bad6475504b5fr2 _:r1513890962r2, _:r1513890962r3, _:r1513890962r4 . _:rbde447b38bad54935877bad6475504b5fr3 _:r1513890962r5 . _:rbde447b38bad54935877bad6475504b5fr4 _:r1513890962r6, "Changed the generated changelogs to include groupings."^^ . _:rbde447b38bad54935877bad6475504b5fr5 _:r1513890962r7, "Changed the generated changelogs yet again, to include 'RT' or 'GH' before issue numbers."^^ . _:rbde447b38bad54935877bad6475504b5fr6 _:r1513890962r8 . _:rbde447b38bad54935877bad6475504b5fr7 _:r1513890962r9 . _:rbde447b38bad54935877bad6475504b5fr8 _:r1513890962r10 . _:rbde447b38bad54935877bad6475504b5fr9 _:r1513890962r11 . "the same terms as the perl 5 programming language system itself" . _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r2 ; _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r10, _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r11, _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r3, _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r4, _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r5, _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r6, _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r7, _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r8, _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r9 ; _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r0, _:rbb873a7c1a2b2451ca68ca03e1c4eddc0r1 ; , ; ; ; "2013-08-11"^^ ; ; ; ; ; , ; "RDF-DOAP" ; "Perl" ; , , , , , , , , , , , , ; _:rb5fc40458708e460eb4b0fcd1ef00c702r0 ; "an object-oriented interface for DOAP (Description of a Project) data" ; ; a . ; "RDF-DOAP-0.001"^^ ; "2013-08-12"^^ ; ; "0.001"^^ ; a ; "Initial release" . _:rbde447b38bad54935877bad6475504b5fr0 ; ; "RDF-DOAP-0.002"^^ ; "2013-08-12"^^ ; ; "0.002"^^ ; a . _:rbde447b38bad54935877bad6475504b5fr1 ; ; "RDF-DOAP-0.003"^^ ; "2013-08-13"^^ ; ; "0.003"^^ ; a . _:rbde447b38bad54935877bad6475504b5fr2 ; ; "RDF-DOAP-0.004"^^ ; "2013-08-13"^^ ; ; "0.004"^^ ; a . _:rbde447b38bad54935877bad6475504b5fr3 ; ; "RDF-DOAP-0.005"^^ ; "2013-08-13"^^ ; ; "0.005"^^ ; a . _:rbde447b38bad54935877bad6475504b5fr4 ; ; "RDF-DOAP-0.006"^^ ; "2013-09-03"^^ ; ; "0.006"^^ ; a . _:rbde447b38bad54935877bad6475504b5fr5 ; ; "RDF-DOAP-0.007"^^ ; "2013-09-03"^^ ; ; "0.007"^^ ; a . _:rbde447b38bad54935877bad6475504b5fr6 ; ; "RDF-DOAP-0.008"^^ ; "2013-09-03"^^ ; ; "0.008"^^ ; a . _:rbde447b38bad54935877bad6475504b5fr7 ; ; "RDF-DOAP-0.009"^^ ; "2013-09-07"^^ ; ; "0.009"^^ ; a . _:rbde447b38bad54935877bad6475504b5fr8 ; ; "RDF-DOAP-0.010"^^ ; "2013-09-30"^^ ; ; "0.010"^^ ; a . _:rbde447b38bad54935877bad6475504b5fr9 ; ; "RDF-DOAP-0.011"^^ ; "2014-08-12"^^ ; ; "0.011"^^ ; a . _:rbde447b38bad54935877bad6475504b5fr10 ; ; "RDF-DOAP-0.012"^^ ; "2014-09-07"^^ ; ; "0.012"^^ ; a . _:rbde447b38bad54935877bad6475504b5fr11 ; ; "RDF-DOAP-0.100"^^ ; "2017-12-21"^^ ; ; "0.100"^^ ; a . a ; , ; ; "Kjetil Kjernsmo" ; "KJETILK" ; . a ; ; ; "Toby Inkster" ; "TOBYINK" ; . changelog.pl000644001750001750 33513217022227 16736 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/examplesuse 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.pl000644001750001750 71213217022227 16443 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/examplesuse 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.pl000644001750001750 34013217022227 17017 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/examplesuse 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.pl000644001750001750 41513217022227 17037 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/examplesuse 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.pl000644001750001750 34013217022227 16274 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/examplesuse 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.t000644001750001750 66113217022227 14510 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/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.t000644001750001750 3140013217022227 15412 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/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.pm000644001750001750 1236013217022227 15137 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/lib/RDFuse 5.010; use strict; use warnings; package RDF::DOAP; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; 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. Kjetil Kjernsmo Ekjetilk@cpan.orgE. =head1 COPYRIGHT AND LICENCE This software is copyright (c) 2013 by Toby Inkster, 2017 by Kjetil Kjernsmo. 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.pm000644001750001750 470613217022227 16311 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/lib/RDF/DOAPpackage RDF::DOAP::Change; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; use Moose; extends qw(RDF::DOAP::Resource); use RDF::DOAP::Person; use RDF::DOAP::Types -types; use RDF::DOAP::Utils -traits; use List::Util 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.pm000644001750001750 125413217022227 16760 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/lib/RDF/DOAPpackage RDF::DOAP::ChangeSet; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; 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.pm000644001750001750 223613217022227 16210 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/lib/RDF/DOAPpackage RDF::DOAP::Issue; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; 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.pm000644001750001750 375013217022227 16370 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/lib/RDF/DOAPpackage RDF::DOAP::Person; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; 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.pm000644001750001750 726213217022227 16532 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/lib/RDF/DOAPpackage RDF::DOAP::Project; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; 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 support_forum developer_forum ); 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.pm000644001750001750 130413217022227 17272 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/lib/RDF/DOAPpackage RDF::DOAP::Repository; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; 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.pm000644001750001750 713613217022227 16713 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/lib/RDF/DOAPpackage RDF::DOAP::Resource; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; 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.pm000644001750001750 176313217022227 16230 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/lib/RDF/DOAPpackage RDF::DOAP::Types; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; use strict; use warnings; 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.pm000644001750001750 272513217022227 16223 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/lib/RDF/DOAPpackage RDF::DOAP::Utils; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; use strict; use warnings; use RDF::DOAP::Types -types; use match::simple 'match'; use List::Util '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.pm000644001750001750 753013217022227 16547 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/lib/RDF/DOAPpackage RDF::DOAP::Version; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; 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::Util 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.pm000644001750001750 16713217022227 20021 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/lib/RDF/DOAP/Changepackage RDF::DOAP::Change::Addition; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; use Moose::Role; 1; BackCompat.pm000644001750001750 17113217022227 20265 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/lib/RDF/DOAP/Changepackage RDF::DOAP::Change::BackCompat; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; use Moose::Role; 1; Bugfix.pm000644001750001750 264613217022227 17536 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/lib/RDF/DOAP/Changepackage RDF::DOAP::Change::Bugfix; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; 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.pm000644001750001750 17413217022227 21075 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/lib/RDF/DOAP/Changepackage RDF::DOAP::Change::Documentation; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; use Moose::Role; 1; Packaging.pm000644001750001750 17013217022227 20144 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/lib/RDF/DOAP/Changepackage RDF::DOAP::Change::Packaging; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; use Moose::Role; 1; Regression.pm000644001750001750 17113217022227 20401 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/lib/RDF/DOAP/Changepackage RDF::DOAP::Change::Regression; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; use Moose::Role; 1; Removal.pm000644001750001750 16613217022227 17672 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/lib/RDF/DOAP/Changepackage RDF::DOAP::Change::Removal; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; use Moose::Role; 1; SecurityFix.pm000644001750001750 17213217022227 20540 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/lib/RDF/DOAP/Changepackage RDF::DOAP::Change::SecurityFix; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; use Moose::Role; 1; SecurityRegression.pm000644001750001750 20113217022227 22123 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/lib/RDF/DOAP/Changepackage RDF::DOAP::Change::SecurityRegression; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; use Moose::Role; 1; Tests.pm000644001750001750 16413217022227 17365 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/lib/RDF/DOAP/Changepackage RDF::DOAP::Change::Tests; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; use Moose::Role; 1; Update.pm000644001750001750 16513217022227 17506 0ustar00kjetilkjetil000000000000RDF-DOAP-0.100/lib/RDF/DOAP/Changepackage RDF::DOAP::Change::Update; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.100'; use Moose::Role; 1;