CONTRIBUTING000644001750001750 531712310403562 14173 0ustar00taitai000000000000RDF-DOAP-Lite-0.002NAME 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-2013 by Toby Inkster. CONTRIBUTING.pod is licensed under the Creative Commons Attribution-ShareAlike 2.0 UK: England & Wales License. To view a copy of this license, visit . COPYRIGHT000644001750001750 215412310403562 13630 0ustar00taitai000000000000RDF-DOAP-Lite-0.002Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: RDF-DOAP-Lite Upstream-Contact: Toby Inkster (TOBYINK) Source: https://metacpan.org/release/RDF-DOAP-Lite Files: Changes META.json META.yml doap.ttl Copyright: Copyright 2014 Toby Inkster. License: GPL-1.0+ or Artistic-1.0 Files: CONTRIBUTING INSTALL LICENSE examples/meta-to-doap.pl Copyright: Unknown License: Unknown Files: README lib/RDF/DOAP/Lite.pm t/01basic.t Copyright: This software is copyright (c) 2013-2014 by Toby Inkster. License: GPL-1.0+ or Artistic-1.0 Files: COPYRIGHT CREDITS SIGNATURE Copyright: None License: public-domain Files: Makefile.PL bin/cpan2doap 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 CREDITS000644001750001750 7112310403561 13310 0ustar00taitai000000000000RDF-DOAP-Lite-0.002Maintainer: - Toby Inkster (TOBYINK) Changes000644001750001750 55512310403561 13612 0ustar00taitai000000000000RDF-DOAP-Lite-0.002RDF-DOAP-Lite ============= Created: 2013-09-16 Home page: Bug tracker: Maintainer: Toby Inkster (TOBYINK) 0.002 2013-03-13 [ Bug Fixes ] - Fix issues parsing META.json's person-like strings. 0.001 2013-09-17 Initial release INSTALL000644001750001750 170212310403561 13363 0ustar00taitai000000000000RDF-DOAP-Lite-0.002 Installing RDF-DOAP-Lite should be straightforward. INSTALLATION WITH CPANMINUS If you have cpanm, you only need one line: % cpanm RDF::DOAP::Lite 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::Lite INSTALLATION WITH THE CPAN SHELL Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan RDF::DOAP::Lite 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-Lite: % 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 4365312310403561 13372 0ustar00taitai000000000000RDF-DOAP-Lite-0.002This 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, Suite 500, Boston, MA 02110-1335 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 MANIFEST000644001750001750 31212310403562 13440 0ustar00taitai000000000000RDF-DOAP-Lite-0.002CONTRIBUTING COPYRIGHT CREDITS Changes INSTALL LICENSE MANIFEST META.json META.yml Makefile.PL README SIGNATURE bin/cpan2doap dist.ini doap.ttl examples/meta-to-doap.pl lib/RDF/DOAP/Lite.pm t/01basic.t META.json000644001750001750 367412310403562 13766 0ustar00taitai000000000000RDF-DOAP-Lite-0.002{ "abstract" : "write DOAP data quickly and easily", "author" : [ "Toby Inkster (TOBYINK) " ], "dynamic_config" : 0, "generated_by" : "Dist::Inkt::Profile::TOBYINK version 0.015, CPAN::Meta::Converter version 2.120921", "keywords" : [], "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "RDF-DOAP-Lite", "no_index" : { "directory" : [ "eg", "examples", "inc", "t", "xt" ] }, "optional_features" : {}, "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.17" } }, "develop" : { "recommends" : { "Dist::Inkt" : "0.001" } }, "runtime" : { "recommends" : { "CPAN::Changes" : "0" }, "requires" : { "CPAN::Meta" : "2.110320", "Scalar::Util" : "1.24" } }, "test" : { "requires" : { "Test::More" : "0.96" } } }, "provides" : { "RDF::DOAP::Lite" : { "file" : "lib/RDF/DOAP/Lite.pm", "version" : "0.002" } }, "release_status" : "stable", "resources" : { "X_identifier" : "http://purl.org/NET/cpan-uri/dist/RDF-DOAP-Lite/project", "bugtracker" : { "web" : "http://rt.cpan.org/Dist/Display.html?Queue=RDF-DOAP-Lite" }, "homepage" : "https://metacpan.org/release/RDF-DOAP-Lite", "license" : [ "http://dev.perl.org/licenses/" ], "repository" : { "type" : "git", "url" : "git://github.com/tobyink/p5-rdf-doap-lite.git", "web" : "https://github.com/tobyink/p5-rdf-doap-lite" } }, "version" : "0.002", "x_provides_scripts" : { "cpan2doap" : { "file" : "bin/cpan2doap" } } } META.yml000644001750001750 207512310403562 13610 0ustar00taitai000000000000RDF-DOAP-Lite-0.002--- abstract: 'write DOAP data quickly and easily' author: - 'Toby Inkster (TOBYINK) ' build_requires: Test::More: 0.96 configure_requires: ExtUtils::MakeMaker: 6.17 dynamic_config: 0 generated_by: 'Dist::Inkt::Profile::TOBYINK version 0.015, CPAN::Meta::Converter version 2.120921' keywords: [] license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: RDF-DOAP-Lite no_index: directory: - eg - examples - inc - t - xt optional_features: {} provides: RDF::DOAP::Lite: file: lib/RDF/DOAP/Lite.pm version: 0.002 recommends: CPAN::Changes: 0 requires: CPAN::Meta: 2.110320 Scalar::Util: 1.24 resources: X_identifier: http://purl.org/NET/cpan-uri/dist/RDF-DOAP-Lite/project bugtracker: http://rt.cpan.org/Dist/Display.html?Queue=RDF-DOAP-Lite homepage: https://metacpan.org/release/RDF-DOAP-Lite license: http://dev.perl.org/licenses/ repository: git://github.com/tobyink/p5-rdf-doap-lite.git version: 0.002 x_provides_scripts: cpan2doap: file: bin/cpan2doap Makefile.PL000644001750001750 1222312310403562 14325 0ustar00taitai000000000000RDF-DOAP-Lite-0.002use strict; use ExtUtils::MakeMaker 6.17; my $EUMM = eval( $ExtUtils::MakeMaker::VERSION ); my $meta = { "abstract" => "write DOAP data quickly and easily", "author" => ["Toby Inkster (TOBYINK) "], "dynamic_config" => 0, "generated_by" => "Dist::Inkt::Profile::TOBYINK version 0.015, CPAN::Meta::Converter version 2.120921", "keywords" => [], "license" => ["perl_5"], "meta-spec" => { url => "http://search.cpan.org/perldoc?CPAN::Meta::Spec", version => 2, }, "name" => "RDF-DOAP-Lite", "no_index" => { directory => ["eg", "examples", "inc", "t", "xt"] }, "prereqs" => { configure => { requires => { "ExtUtils::MakeMaker" => 6.17 } }, develop => { recommends => { "Dist::Inkt" => 0.001 } }, runtime => { recommends => { "CPAN::Changes" => 0 }, requires => { "CPAN::Meta" => "2.110320", "Scalar::Util" => 1.24 }, }, test => { requires => { "Test::More" => 0.96 } }, }, "provides" => { "RDF::DOAP::Lite" => { file => "lib/RDF/DOAP/Lite.pm", version => 0.002 }, }, "release_status" => "stable", "resources" => { bugtracker => { web => "http://rt.cpan.org/Dist/Display.html?Queue=RDF-DOAP-Lite", }, homepage => "https://metacpan.org/release/RDF-DOAP-Lite", license => ["http://dev.perl.org/licenses/"], repository => { type => "git", url => "git://github.com/tobyink/p5-rdf-doap-lite.git", web => "https://github.com/tobyink/p5-rdf-doap-lite", }, X_identifier => "http://purl.org/NET/cpan-uri/dist/RDF-DOAP-Lite/project", }, "version" => 0.002, "x_provides_scripts" => { cpan2doap => { file => "bin/cpan2doap" } }, }; 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 475112310403561 13221 0ustar00taitai000000000000RDF-DOAP-Lite-0.002NAME RDF::DOAP::Lite - write DOAP data quickly and easily SYNOPSIS use CPAN::Changes; use CPAN::Meta; use RDF::DOAP::Lite; my $changes = CPAN::Changes->load('Changes'); my $meta = CPAN::Meta->load_file('META.json'); my $doap = RDF::DOAP::Lite->new(meta => $meta, changes => $changes); $doap->doap_ttl('doap.ttl'); $doap->doap_xml('doap.xml'); DESCRIPTION This is a small companion module to RDF::DOAP, enabling you to output DOAP data easily from standard CPAN distribution files. The Straight DOAP So what is DOAP? This explanation is lifted from Wikipedia . *DOAP (Description of a Project) is an RDF Schema and XML vocabulary to describe software projects, in particular free and open source software.* *It was created and initially developed by Edd Dumbill to convey semantic information associated with open source software projects.* *It is currently used in the Mozilla Foundation's project page and in several other software repositories, notably the Python Package Index.* Constructor `new(%attributes)` Moose-style constructor (though this module does not use Moose). Attributes `meta` This is a required attribute; a CPAN::Meta object. `changes` This is an optional attribute; a CPAN::Changes object. Methods `doap_ttl($file)` Writes DOAP data in the Turtle serialization to the file. The file may be provided as a filename (string) or a file handle. `doap_xml($file)` Writes DOAP data in the RDF/XML serialization to the file. The file may be provided as a filename (string) or a file handle. BUGS Please report any bugs to . SEE ALSO This module comes with a bundled command-line tool, cpan2doap. For parsing DOAP data, see RDF::DOAP. For general RDF processing, use RDF::Trine and RDF::Query. AUTHOR Toby Inkster . COPYRIGHT AND LICENCE This software is copyright (c) 2013-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. 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 325212310403563 13622 0ustar00taitai000000000000RDF-DOAP-Lite-0.002This file contains message digests of all files listed in MANIFEST, signed via the Module::Signature module, version 0.70. 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 294505f858f11dd062e9916e3f50d88210a9ef54 CONTRIBUTING SHA1 691525f821da05871dc5f969a3824338d0a9b10f COPYRIGHT SHA1 6bd7b17d81be63d08d4efa6cb80106e72887842c CREDITS SHA1 08eb9021c1e7e42c8ac426741b2f4b0658cf3583 Changes SHA1 33cd7c33e7c12ca349808da06e2fe8dde280e679 INSTALL SHA1 47870123f373f5185d6893cb98bf06a8a05510aa LICENSE SHA1 3eb9465f0f99bbd23da863891e63e9a9c2e53cc6 MANIFEST SHA1 01c415dd8a06efb9e87a7481e2062a27f1607553 META.json SHA1 68f755ec370ebfe2bf0119c9d22635c4772e1550 META.yml SHA1 3f4e87b98924c9f3f1c0772e11d765f565202d39 Makefile.PL SHA1 38d80f9c045dab89f355769110c6d9b956875222 README SHA1 155ea085a7f17b292f32bca000d65be1e9bc1f9c bin/cpan2doap SHA1 2900316d4e16ee4535dcf3a51890b4cd610ec29d dist.ini SHA1 1be401ef0674a4aa233b788309c89304965aae6b doap.ttl SHA1 bcc2bf7c20a9d8f570676d019c21547f41d12d84 examples/meta-to-doap.pl SHA1 8ee1390a3eaf522f6f17d86f2a896e60e8ad8ba8 lib/RDF/DOAP/Lite.pm SHA1 c6335a7ab413c6219a02fa882e2c51108283d3b0 t/01basic.t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) iEYEARECAAYFAlMiB3MACgkQzr+BKGoqfTnwrACaA3CxOoj6R1Lmc5RWfk5vWt0K dAUAn3SOqjhPwSm+SiuA98Xz+AUergvZ =ZORl -----END PGP SIGNATURE----- dist.ini000644001750001750 7712310403561 13742 0ustar00taitai000000000000RDF-DOAP-Lite-0.002;;class='Dist::Inkt::Profile::TOBYINK' ;;name='RDF-DOAP-Lite' doap.ttl000644001750001750 617512310403562 14014 0ustar00taitai000000000000RDF-DOAP-Lite-0.002@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-recommendation [ doap-deps:on "CPAN::Changes"^^doap-deps:CpanId ]; doap-deps:runtime-requirement [ doap-deps:on "CPAN::Meta 2.110320"^^doap-deps:CpanId; ], [ doap-deps:on "Scalar::Util 1.24"^^doap-deps:CpanId ]; doap-deps:test-requirement [ doap-deps:on "Test::More 0.96"^^doap-deps:CpanId ]; doap:bug-database ; doap:created "2013-09-16"^^xsd:date; doap:developer ; doap:download-page ; doap:homepage ; doap:license ; doap:maintainer ; doap:name "RDF-DOAP-Lite"; doap:programming-language "Perl"; doap:release , ; doap:repository [ a doap:GitRepository; doap:browse ; ]; doap:shortdesc "write DOAP data quickly and easily". a doap:Version; rdfs:label "Initial release"; dc:identifier "RDF-DOAP-Lite-0.001"^^xsd:string; dc:issued "2013-09-17"^^xsd:date; doap-changeset:released-by ; doap:file-release ; doap:revision "0.001"^^xsd:string. a doap:Version; dc:identifier "RDF-DOAP-Lite-0.002"^^xsd:string; dc:issued "2013-03-13"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Bugfix; rdfs:label "Fix issues parsing META.json's person-like strings."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.002"^^xsd:string. a foaf:Person; foaf:mbox ; foaf:name "Toby Inkster"; foaf:nick "TOBYINK"; foaf:page . cpan2doap000644001750001750 727112310403561 14703 0ustar00taitai000000000000RDF-DOAP-Lite-0.002/bin#!/usr/bin/env perl use strict; use warnings; require Getopt::Long; my %options = ( 'meta-file' => 'META.json', 'changes-file' => 'Changes', 'output-file' => 'doap.rdf', 'output-format' => 'auto', ); Getopt::Long::GetOptions( \%options, 'meta-file|m=s', 'changes-file|c=s', 'output-file|o=s', 'output-format=s', 'help|usage|h', 'version|V', ); if ($options{'version'}) { printf("cpan2doap (RDF::DOAP::Lite %s)\n", RDF::DOAP::Lite->VERSION); exit(0); } if ($options{'help'}) { print <<"HELP"; exit; Usage: $0 [options] Options: --meta-file=F, -m F Input file name conforming to CPAN::Meta::Spec. Defaults to 'META.json'. --changes-file=F, -c F Input file name conforming to CPAN::Changes::Spec. Defaults to 'Changes'. --output-file=F, -o F File name for output. Defaults to 'doap.rdf'. --output-format=X Output format. One of 'xml', 'ttl' or 'auto'. --help, --usage, -h Shows this help. --version, -V Show version information. HELP } my %attrs; if (-f $options{'meta-file'}) { require CPAN::Meta; $attrs{'meta'} = 'CPAN::Meta'->load_file($options{'meta-file'}); } else { die("Input file $options{'meta-file'} does not exist!\n"); } if (-f $options{'changes-file'}) { if (eval { require CPAN::Changes }) { $attrs{'changes'} = 'CPAN::Changes'->load($options{'changes-file'}); } else { warn("Changes file cannot be processed without CPAN::Changes.\n"); } } else { warn("Input file $options{'changes-file'} does not exist!\n"); } require RDF::DOAP::Lite; my $doap = 'RDF::DOAP::Lite'->new(%attrs); my $method = 'doap_xml'; if (lc($options{'output-format'}) eq 'ttl') { $method = 'doap_ttl'; } elsif (lc($options{'output-format'}) eq 'xml') { $method = 'doap_xml'; } elsif ($options{'output-file'} =~ /\.(ttl|turtle|n3|txt)$/i) { $method = 'doap_ttl'; } $doap->$method($options{'output-file'}); __END__ =pod =encoding utf-8 =head1 NAME cpan2doap - generate DOAP data from a CPAN distribution's root directory =head1 SYNPOSIS B [options] =head1 DESCRIPTION The B command generates DOAP data in either RDF/XML or Turtle serialization from the 'META.json' and 'Changes' files often found in a CPAN distribution's root directory. =head1 OPTIONS =over =item B<< --meta-file=F, -m F >> Input file name conforming to CPAN::Meta::Spec. Defaults to 'META.json'. =item B<< --changes-file=F, -c F >> Input file name conforming to CPAN::Changes::Spec. Defaults to 'Changes'. =item B<< --output-file=F, -o F >> File name for output. Defaults to 'doap.rdf'. =item B<< --output-format=X >> Output format. One of 'xml', 'ttl' or 'auto'. =item B<< --help, --usage, -h >> Shows help. =item B<< --version, -V >> Show version information. =back =head1 EXAMPLES For many distributions, accepting the defaults is adequate: cpan2doap For older distributions which use 'META.yml' instead of 'META.json': cpan2doap -m META.yml To output data in Turtle format (less verbose than RDF/XML): cpan2doap -o doap.ttl =head1 BUGS Please report any bugs to L. =head1 SEE ALSO L. =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. meta-to-doap.pl000644001750001750 2657112310403561 17027 0ustar00taitai000000000000RDF-DOAP-Lite-0.002/examples#!/usr/bin/env perl use CPAN::Meta; use CPAN::Changes; use RDF::DOAP::Lite; my $doap = RDF::DOAP::Lite->new( meta => get_meta(), changes => get_changes(), ); $doap->doap_xml( \*STDOUT ); sub get_meta { CPAN::Meta->load_json_string(<<'END_META') } sub get_changes { CPAN::Changes->load_string(<<'END_CHANGES') } { "abstract" : "Moops Object-Oriented Programming Sugar", "author" : [ "Toby Inkster (TOBYINK) " ], "dynamic_config" : 1, "generated_by" : "Dist::Inkt::Profile::TOBYINK version 0.010, CPAN::Meta::Converter version 2.120921", "keywords" : [], "license" : [ "perl" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Moops", "no_index" : { "directory" : [ "eg", "examples", "inc", "t", "xt" ] }, "optional_features" : { "Moo" : { "description" : "allow classes and roles to be built with Moo", "prereqs" : { "runtime" : { "suggests" : { "MooX::HandlesVia" : "0" } } }, "x_default" : 1 }, "Moose" : { "description" : "allow classes and roles to be built with Moose", "prereqs" : { "runtime" : { "recommends" : { "MooseX::XSAccessor" : "0" }, "requires" : { "Moose" : "2.0600" } }, "test" : { "suggests" : { "MooseX::Types::Common::Numeric" : "0" } } }, "x_default" : 0 }, "Mouse" : { "description" : "allow classes and roles to be built with Mouse", "prereqs" : { "runtime" : { "requires" : { "Mouse" : "1.00" } } }, "x_default" : 0 }, "Tiny" : { "description" : "allow classes and roles to be built with Class::Tiny/Role::Tiny", "prereqs" : { "runtime" : { "requires" : { "Class::Tiny::Antlers" : "0", "Role::Tiny" : "1.000000" } } }, "x_default" : 0 } }, "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.17" } }, "develop" : { "recommends" : { "Dist::Inkt" : "0" } }, "runtime" : { "requires" : { "Devel::Pragma" : "0.54", "Function::Parameters" : "1.0301", "Import::Into" : "1.000000", "Keyword::Simple" : "0.01", "Module::Runtime" : "0.013", "Moo" : "1.003000", "MooX::late" : "0.014", "MooseX::MungeHas" : "0.002", "Scalar::Util" : "1.24", "Try::Tiny" : "0.12", "Type::Utils" : "0.024", "namespace::sweep" : "0.006", "perl" : "5.014", "true" : "0.18" } }, "test" : { "requires" : { "Test::Fatal" : "0", "Test::More" : "0.96", "Test::Requires" : "0" }, "suggests" : { "Types::XSD::Lite" : "0.003" } } }, "provides" : { "Moops" : { "file" : "lib/Moops.pm", "version" : "0.022" }, "Moops::ImportSet" : { "file" : "lib/Moops/ImportSet.pm", "version" : "0.022" }, "Moops::Keyword" : { "file" : "lib/Moops/Keyword.pm", "version" : "0.022" }, "Moops::Keyword::Class" : { "file" : "lib/Moops/Keyword/Class.pm", "version" : "0.022" }, "Moops::Keyword::Library" : { "file" : "lib/Moops/Keyword/Library.pm", "version" : "0.022" }, "Moops::Keyword::Role" : { "file" : "lib/Moops/Keyword/Role.pm", "version" : "0.022" }, "Moops::MethodModifiers" : { "file" : "lib/Moops/MethodModifiers.pm", "version" : "0.022" }, "Moops::Parser" : { "file" : "lib/Moops/Parser.pm", "version" : "0.022" }, "Moops::TraitFor::Keyword::assertions" : { "file" : "lib/Moops/TraitFor/Keyword/assertions.pm", "version" : "0.022" }, "Moops::TraitFor::Keyword::dirty" : { "file" : "lib/Moops/TraitFor/Keyword/dirty.pm", "version" : "0.022" }, "Moops::TraitFor::Keyword::mutable" : { "file" : "lib/Moops/TraitFor/Keyword/mutable.pm", "version" : "0.022" }, "Moops::TraitFor::Keyword::ro" : { "file" : "lib/Moops/TraitFor/Keyword/ro.pm", "version" : "0.022" }, "Moops::TraitFor::Keyword::rw" : { "file" : "lib/Moops/TraitFor/Keyword/rw.pm", "version" : "0.022" }, "Moops::TraitFor::Keyword::rwp" : { "file" : "lib/Moops/TraitFor/Keyword/rwp.pm", "version" : "0.022" }, "MooseX::FunctionParametersInfo" : { "file" : "lib/MooseX/FunctionParametersInfo.pm", "version" : "0.022" }, "MooseX::FunctionParametersInfo::Trait::Method" : { "file" : "lib/MooseX/FunctionParametersInfo.pm", "version" : "0.022" }, "MooseX::FunctionParametersInfo::Trait::WrappedMethod" : { "file" : "lib/MooseX/FunctionParametersInfo.pm", "version" : "0.022" }, "PerlX::Assert" : { "file" : "lib/PerlX/Assert.pm", "version" : "0.022" }, "PerlX::Define" : { "file" : "lib/PerlX/Define.pm", "version" : "0.022" } }, "release_status" : "stable", "resources" : { "X_identifier" : "http://purl.org/NET/cpan-uri/dist/Moops/project", "bugtracker" : { "web" : "http://rt.cpan.org/Dist/Display.html?Queue=Moops" }, "homepage" : "https://metacpan.org/release/Moops", "license" : [ "http://dev.perl.org/licenses/" ], "repository" : { "type" : "git", "web" : "https://github.com/tobyink/p5-moops" } }, "version" : "0.022" } END_META Moops ===== Created: 2013-06-30 Home page: Bug tracker: Maintainer: Toby Inkster (TOBYINK) 0.022 2013-09-16 - Minor updates to work with Function::Parameters 1.0301. 0.021 2013-09-12 - Allow version numbers to be specified for the `with`, `extends` and `types` options. 0.020 2013-09-11 [ BACK COMPAT ] - Moops->import now takes a hash of options (including the `imports` option) rather than an arrayref of modules to import. [ Packaging ] - List Moose/Mouse/Moo/Class::Tiny dependencies as optional_features in META.json. [ Other ] - Improve Moops' extensibility via parser traits. 0.019 2013-08-30 - Removed: Removed Class::Tiny::Antlers; this is now a separate CPAN distribution. 0.018 2013-08-27 - Added: Add a `library` keyword for declaring type libraries. - Declared packages now get an implied BEGIN {...} block around themselves. 0.017 2013-08-21 - Updated: Support Class::Tiny 0.004. 0.016 2013-08-21 - Added: Provide a `types` option for loading type constraint libraries into classes, roles and namespaces. 0.015 2013-08-21 [ Bug Fixes ] - Fix a reference to Moops::DefineKeyword which will only work if you happen to have installed Moops over the top of a pre-0.012 version of Moops. - Load feature.pm so that it's consistently exported to the outer scope. 0.014 2013-08-21 [ Documentation ] - Document Class::Tiny::Antlers. [ Other ] - Added: MooseX::FunctionParametersInfo - Class::Tiny::Antlers now supports has \@attrs like Moose. 0.013 2013-08-20 [ Bug Fixes ] - Fix test that uses Role::Tiny and Class::Tiny without declaring them (Test::Requires). 0.012 2013-08-20 [ Documentation ] - Various documentation improvements. [ Other ] - Added: PerlX::Assert - Rename Moops::DefineKeyword -> PerlX::Define. 0.011 2013-08-20 [ Documentation ] - Document Attribute::Handlers-style attributes as an extensibility mechanism. [ Other ] - Added: Class::Tiny::Antlers - Added: Moops::TraitFor::Keyword::dirty - Added: Moops::TraitFor::Keyword::mutable - Added: Moops::TraitFor::Keyword::ro - Added: Moops::TraitFor::Keyword::rw - Added: Moops::TraitFor::Keyword::rwp - Added: Support classes built `using Class::Tiny`. - Moose classes will now `use Moose::XSAccessor` if possible. - Use MooseX::MungeHas to 0.002 smooth over more differences between Moo, Mouse and Moose. 0.010 2013-08-19 - Added: Parse Attribute::Handlers-style attributes attached to package declarations; treat these as traits for the code generator. - Much refactoring. - Rename Moops::CodeGenerator -> Moops::Keyword. 0.009 2013-08-19 [ Bug Fixes ] - Fix at-runtime hook (used for method modifiers). [ Packaging ] - The test suite is now in a reasonable state. 0.008 2013-08-18 [ Bug Fixes ] - Fix custom imports feature. - Found a remaining hard-coded list of keywords that was breaking extensibility mechanism. - Stop using constant.pm (though it's still required via Moo); this allows `true` and `false` to be correcting swept by namespace::sweep. [ Documentation ] - Bundle an example showing how to extend Moops. [ Packaging ] - Add Mouse and Moose as 'runtime suggests' dependencies. - Add Perl 5.14 as an explicit dependency. - More test suite improvements; still more to do. 0.007 2013-08-18 [ Bug Fixes ] - Fix parsing for the `namespace` keyword that was broken in 0.005. [ Packaging ] - Dependency - runtime suggestion for MooX::HandlesVia. - More test suite improvements; still more to do. [ Other ] - Help Class::Load (and thus Moose) notice that empty roles are loaded by setting $VERSION to an empty string when no version is specified. 0.006 2013-08-16 [ Documentation ] - Much improved documentation. [ Packaging ] - Some test suite improvements; more to come. [ Other ] - Call __PACKAGE__->meta->make_immutable on Moose/Mouse classes. - Rename MooX::Aspartame -> Moops. 0.005 2013-08-14 [ REGRESSIONS ] - Broke `namespace` keyword. [ Other ] - Improvements handling comments when parsing. - Massive amounts of refactoring to simplify maintenance and make subclassing easier. 0.004 2013-08-14 - Added: Implement `before`, `after` and `around` method modifiers. - Added: Implement `define` keyword to declare constants. - Removed: Drop the `classmethod` keyword; it's better to use `method` and give the invocant an explicit variable name. - Removed: Drop the `exporter` keyword; it is better to explicitly create a class extending Exporter::TypeTiny or Exporter. - The `method` keyword is only available in classes and roles; not plain namespaces. 0.003 2013-08-13 [ Packaging ] - use Dist::Inkt. [ Other ] - Added: New keyword `namespace`. - Don't export Try::Tiny to the outer scope, as it's not lexical. - Misc internal refactoring. - Re-implement relative package names, in a new, saner way. - Updated: use Function::Parameters 1.0201, because it has configurable type constraint reification. 0.002 2013-07-17 - Added: use MooX::late 0.014. - Misc internal refactoring. - Updated: use Moo 1.003000. 0.001 2013-07-01 Initial release END_CHANGES 01basic.t000644001750001750 70312310403561 14164 0ustar00taitai000000000000RDF-DOAP-Lite-0.002/t=pod =encoding utf-8 =head1 PURPOSE Test that RDF::DOAP::Lite compiles. =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT AND LICENCE This software is copyright (c) 2013-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. =cut use strict; use warnings; use Test::More; use_ok('RDF::DOAP::Lite'); done_testing; Lite.pm000644001750001750 2663312310403561 15523 0ustar00taitai000000000000RDF-DOAP-Lite-0.002/lib/RDF/DOAPuse 5.008004; use strict; use warnings; use utf8; package RDF::DOAP::Lite; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.002'; use CPAN::Meta 2.110320 qw(); use Scalar::Util 1.24 qw( openhandle ); # ============= helper functions ============= sub parse_person { $_[0] =~ m{ \A \s* (\S.+) (?: \s+ \((\w+)\) ) (?: \s+ <(?:mailto\:)?(.+)> ) \s* \z }ix and return ($1, $2, $3); $_[0] =~ m{ \A \s* (\S.+) (?: \s+ <(?:mailto\:)?(.+)> ) \s* \z }ix and return ($1, undef, $2); return $_[0]; } { my %TURTLE = ( "\t" => "\\t", "\n" => "\\n", "\r" => "\\r", "\"" => "\\\"", "\\" => "\\\\" ); sub turtle_literal { no warnings 'uninitialized'; local $_ = $_[0]; return q[""] if $_ eq ''; s{([\t\n\r\"\\])}{$TURTLE{$1}}sg; qq("$_"); } } sub turtle_person { my ($name, $nick, $mbox) = parse_person @_; unless (defined $nick or defined $mbox) { return '[ a foaf:Person ]' unless defined $name; return sprintf('[ a foaf:Person; rdfs:label %s ]', turtle_literal $name); } my $person = '[ a foaf:Person'; $person .= sprintf('; foaf:name %s', turtle_literal $name) if defined $name; $person .= sprintf('; foaf:nick %s', turtle_literal $nick) if defined $nick; $person .= sprintf('; foaf:mbox ', $mbox) if defined $mbox; $person .= ' ]'; } { my %XML = ('&' => '&', '"' => '"', '<' => '<', '>' => '>'); sub xml_literal { local $_ = shift; s{([&"<>])}{$XML{$1}}sg; return $_; } } sub xml_person { my ($name, $nick, $mbox) = parse_person @_; unless (defined $nick or defined $mbox) { return '' unless defined $name; return sprintf('', xml_literal $name); } my $person = "\n"; $person .= sprintf(" %s\n", xml_literal $name) if defined $name; $person .= sprintf(" %s\n", xml_literal $nick) if defined $nick; $person .= sprintf(" \n", xml_literal $mbox) if defined $mbox; $person .= " "; return $person; } sub rdf_datetype { ($_[0] =~ m{ \A [0-9]{4} - [0-9]{2} - [0-9]{2} \z }x) ? 'date' : 'dateTime'; } # ============= class definition ============= sub new { my $c = shift; bless { @_==1 ? %{$_[0]} : @_ }, $c } sub meta { $_[0]{meta} } sub changes { $_[0]{changes} } my %LICENSE = qw( agpl_3 http://www.gnu.org/licenses/agpl-3.0.txt apache_1_1 http://www.apache.org/licenses/LICENSE-1.1 apache_2_0 http://www.apache.org/licenses/LICENSE-2.0.txt artistic_1 http://www.perlfoundation.org/artistic_license_1_0 artistic_2 http://www.perlfoundation.org/artistic_license_2_0 bsd http://www.opensource.org/licenses/bsd-license.php freebsd http://www.freebsd.org/copyright/freebsd-license.html gfdl_1_2 http://www.gnu.org/licenses/fdl-1.2.html gfdl_1_3 http://www.gnu.org/licenses/fdl-1.3.html gpl_1 http://www.gnu.org/licenses/old-licenses/gpl-1.0.txt gpl_2 http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt gpl_3 http://www.gnu.org/licenses/gpl-3.0.txt lgpl_2_1 http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt lgpl_3_0 http://www.gnu.org/licenses/lgpl-3.0.txt mit http://www.opensource.org/licenses/mit-license.php mozilla_1_0 http://www.mozilla.org/MPL/MPL-1.0.txt mozilla_1_1 http://www.mozilla.org/MPL/MPL-1.1.txt openssl http://www.openssl.org/source/license.html perl http://dev.perl.org/licenses/ perl_5 http://dev.perl.org/licenses/ qpl_1_0 http://trolltech.com/products/qt/licenses/licensing/qpl ssleay http://h71000.www7.hp.com/doc/83final/BA554_90007/apcs02.html sun http://www.openoffice.org/licenses/sissl_license.html zlib http://www.zlib.net/zlib_license.html ); my %REPO = qw( cvs CVS git Git hg Hg svn SVN ); sub doap_ttl { my $self = shift; my $fh = openhandle($_[0]) ? $_[0] : do { open my $fh, '>', $_[0] or die("Could not open $_[0]: $!"); $fh }; print {$fh} <<' HEADER', "\n"; @prefix : . @prefix dc: . @prefix foaf: . @prefix rdfs: . @prefix xsd: . HEADER my $meta = $self->meta or die("no meta!"); my $res = $meta->resources; my $uri = $res->{X_identifier} ? "<$res->{X_identifier}>" : '[]'; printf {$fh} "$uri\n"; printf {$fh} " a :Project;\n"; printf {$fh} " :name %s;\n", turtle_literal($_) for grep defined, $meta->name; printf {$fh} " :shortdesc %s;\n", turtle_literal($_) for grep defined, $meta->abstract; printf {$fh} " :description %s;\n", turtle_literal($_) for grep defined, $meta->description; printf {$fh} " :category [ rdfs:label %s ];\n", turtle_literal($_) for grep defined, $meta->keywords; printf {$fh} " :developer %s;\n", turtle_person($_) for grep defined, $meta->authors; printf {$fh} " :helper %s;\n", turtle_person($_) for grep defined, @{ $meta->{x_contributors} || [] }; printf {$fh} " :license <%s>;\n", $_ for map { $LICENSE{$_} || () } $meta->licenses; printf {$fh} " :homepage <%s>;\n", $_ for grep defined, $res->{homepage}; printf {$fh} " :bug-database <%s>;\n", $_ for grep defined, $res->{bugtracker}{web}; if (my $repo = $res->{repository}) { printf {$fh} " :repository [\n"; printf {$fh} " a :%sRepository;\n", $_ for map { $REPO{$_} || '' } $repo->{type}; printf {$fh} " :browse <%s>;\n", $_ for grep defined, $repo->{web}; printf {$fh} " :location <%s>;\n", $_ for grep defined, $repo->{url}; printf {$fh} " ];\n"; } for my $r (map $_->releases, grep defined, $self->changes) { $r->date ? printf {$fh} " :release [ a :Version; :revision %s^^xsd:string; dc:issued %s^^xsd:%s ];\n", turtle_literal($r->version), turtle_literal($r->date), rdf_datetype($r->date) : printf {$fh} " :release [ a :Version; :revision %s^^xsd:string ];\n", turtle_literal($r->version) } printf {$fh} " :programming-language %s.\n", turtle_literal("Perl"); } sub doap_xml { my $self = shift; my $fh = openhandle($_[0]) ? $_[0] : do { open my $fh, '>', $_[0] or die("Could not open $_[0]: $!"); $fh }; print {$fh} <<' HEADER'; meta or die("no meta!"); my $res = $meta->resources; if ($res->{X_identifier}) { printf {$fh} " rdf:about=\"%s\">\n", xml_literal($res->{X_identifier}); } else { printf {$fh} " >\n"; } printf {$fh} " %s\n", xml_literal($_) for grep defined, $meta->name; printf {$fh} " %s\n", xml_literal($_) for grep defined, $meta->abstract; printf {$fh} " %s\n", xml_literal($_) for grep defined, $meta->description; printf {$fh} " \n", xml_literal($_) for grep defined, $meta->keywords; printf {$fh} " \n %s\n \n", xml_person($_) for grep defined, $meta->authors; printf {$fh} " \n %s\n \n", xml_person($_) for grep defined, @{ $meta->{x_contributors} || [] }; printf {$fh} " \n", xml_literal($_) for map { $LICENSE{$_} || () } $meta->licenses; printf {$fh} " \n", xml_literal($_) for grep defined, $res->{homepage}; printf {$fh} " \n", xml_literal($_) for grep defined, $res->{bugtracker}{web}; if (my $repo = $res->{repository}) { printf {$fh} " \n"; printf {$fh} " <%sRepository>\n", $_ for map { $REPO{$_} || '' } $repo->{type}; printf {$fh} " \n", xml_literal($_) for grep defined, $repo->{web}; printf {$fh} " \n", xml_literal($_) for grep defined, $repo->{url}; printf {$fh} " \n", $_ for map { $REPO{$_} || '' } $repo->{type}; printf {$fh} " \n"; } for my $r (map $_->releases, grep defined, $self->changes) { $r->date ? printf {$fh} " \n \n %s\n %s\n \n \n", xml_literal($r->version), rdf_datetype($r->date), xml_literal($r->date) : printf {$fh} " \n \n %s\n \n \n", xml_literal($r->version) } printf {$fh} " %s\n", xml_literal("Perl"); printf {$fh} "\n"; } 1; __END__ =pod =encoding utf-8 =head1 NAME RDF::DOAP::Lite - write DOAP data quickly and easily =head1 SYNOPSIS use CPAN::Changes; use CPAN::Meta; use RDF::DOAP::Lite; my $changes = CPAN::Changes->load('Changes'); my $meta = CPAN::Meta->load_file('META.json'); my $doap = RDF::DOAP::Lite->new(meta => $meta, changes => $changes); $doap->doap_ttl('doap.ttl'); $doap->doap_xml('doap.xml'); =head1 DESCRIPTION This is a small companion module to L, enabling you to output DOAP data easily from standard CPAN distribution files. =head2 The Straight DOAP So what is DOAP? This explanation is lifted from L. I<< DOAP (Description of a Project) is an RDF Schema and XML vocabulary to describe software projects, in particular free and open source software. >> I<< It was created and initially developed by Edd Dumbill to convey semantic information associated with open source software projects. >> I<< It is currently used in the Mozilla Foundation's project page and in several other software repositories, notably the Python Package Index. >> =head2 Constructor =over =item C<< new(%attributes) >> Moose-style constructor (though this module does not use L). =back =head2 Attributes =over =item C<< meta >> This is a required attribute; a L object. =item C<< changes >> This is an optional attribute; a L object. =back =head2 Methods =over =item C<< doap_ttl($file) >> Writes DOAP data in the Turtle serialization to the file. The file may be provided as a filename (string) or a file handle. =item C<< doap_xml($file) >> Writes DOAP data in the RDF/XML serialization to the file. The file may be provided as a filename (string) or a file handle. =back =head1 BUGS Please report any bugs to L. =head1 SEE ALSO This module comes with a bundled command-line tool, L. For parsing DOAP data, see L. For general RDF processing, use L and L. =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT AND LICENCE This software is copyright (c) 2013-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. =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.