Skip to content

Instantly share code, notes, and snippets.

@itcharlie
itcharlie / gist:10b65facc73111fcabf24a93016313ce
Created December 16, 2018 19:28
JSON from metcpan /search/web
{
"total" : 1948,
"results" : [
{
"total" : 359,
"hits" : [
{
"module" : [
{
"indexed" : true,
@itcharlie
itcharlie / error message
Created December 16, 2018 19:25
metacpan_client.dart error message when api url changed to search/web
PS C:\Users\cgonzalez\Desktop> dart .\metacpan_client.dart
200
Unhandled exception:
FormatException: Unexpected end of input (at line 286, character 20)
4
^
#0 _ChunkedJsonParser.fail (dart:convert/runtime/libconvert_patch.dart:1358:5)
#1 _ChunkedJsonParser.close (dart:convert/runtime/libconvert_patch.dart:511:7)
#2 _parseJson (dart:convert/runtime/libconvert_patch.dart:30:10)
@itcharlie
itcharlie / metacpan_client.dart
Created December 16, 2018 19:23
12/16 metacpan_client.dart code
// library for I/O and network sockets
import 'dart:io';
// library for converting charactersets
// Also used for json encoding and decoding
import 'dart:convert';
main() {
@itcharlie
itcharlie / gist:e79b9e5cd886ddfb5de569ef1bb3d1e1
Created December 16, 2018 19:22
Output of metacpan_client.dart - 12/16/2018
PS C:\Users\cgonzalez\Desktop> dart .\metacpan_client.dart
200
{author: ETHER, authorized: true, pod_lines: [290, 979], distribution: Moose, path: lib/Moose.pm, status: latest, releas
e: Moose-2.2011, indexed: true, description: Moose is an extension of the Perl 5 object system. The main goal of Moose i
s to make Perl 5 Object Oriented programming easier, more consistent, and less tedious. With Moose you can think more ab
out what you want to do and less about the mechanics of OOP. Additionally, Moose is built on top of Class::MOP, which is
a metaclass system for Perl 5. This means that Moose not only makes building normal Perl 5 objects better, but it provi
des the power of metaclass programming as well. New to Moose? If you're new to Moose, the best place to start is the Moo
se::Manual docs, followed by the Moose::Cookbook. The intro will show you what Moose is, and how it makes Perl 5 OO bett
er. The cookbook recipes on Moose basics will get you up to speed with many of Moose's features quickly. Once you
@itcharlie
itcharlie / error message
Created December 7, 2018 17:51
error message for metacpan_search.dart
PS C:\Users\cgonzalez\Desktop> dart .\metacpan_client.dart
metacpan_client.dart:56:17: Error: Expected ',' before this.
print( ${data} ) ;
^
metacpan_client.dart:56:22: Error: Expected ':' before this.
print( ${data} ) ;
^
metacpan_client.dart:56:22: Error: Expected an identifier, but got '}'.
print( ${data} ) ;
^
// library for I/O and network sockets
import 'dart:io';
// library for converting charactersets
import 'dart:convert';
// import 'package:http/http.dart' as http;
// https://pub.dartlang.org/packages/http
// Another library to perform http requests
@itcharlie
itcharlie / metacpan_search.dart
Created December 7, 2018 17:12
Dart code to fetch Metacpan results
// library for I/O and network sockets
import 'dart:io';
// library for converting charactersets
import 'dart:convert';
// import 'package:http/http.dart' as http;
// https://pub.dartlang.org/packages/http
// Another library to perform http requests
@itcharlie
itcharlie / Build file for ORLite installation
Created December 5, 2018 00:55
Failure to Install ORLite module on Windows 10
Building and testing ORLite-1.98
cp lib/ORLite.pm blib\lib\ORLite.pm
"C:\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib\lib', 'blib\arch')" t/*.t
t/01_compile.t ....... ok
t/02_basics.t ........ ok
t/03_fk.t ............ ok
t/04_readonly.t ...... ok
t/05_notables.t ...... ok
t/06_create.t ........ ok
t/07_pk.t ............ ok
@itcharlie
itcharlie / gist:b3c9671efc2ab51173e56d817e8d817e
Created August 18, 2018 16:58
succesfull install of ExtUtils::ModuleMaker
All tests successful.
Files=18, Tests=1589, 15 wallclock secs ( 0.27 usr + 0.08 sys = 0.34 CPU)
Result: PASS
(C:\STRAWB~1\c\bin\gmake.exe test exited with 0)
CPAN::Reporter: Test result is 'pass', All tests successful.
CPAN::Reporter: preparing a CPAN Testers report for ExtUtils-ModuleMaker-0.63
CPAN::Reporter: sending test report with 'pass' via Metabase
JKEENAN/ExtUtils-ModuleMaker-0.63.tar.gz
C:\STRAWB~1\c\bin\gmake.exe test -- OK
@itcharlie
itcharlie / gist:28d88611e9abae283ccddf39a199832d
Created August 17, 2018 02:02
Cpan::Reporter configuration failure
(Recommended: 'Metabase uri https://metabase.cpantesters.org/api/v1/ id_file metabase_id.json')
transport? [Metabase uri https://metabase.cpantesters.org/api/v1/ id_file metabase_id.json]
CPAN::Reporter: writing config file to 'C:\Users\itcharlie\.cpanreporter\config.ini'.
Returning to CPAN configuration.
Couldn't open >C:\Strawberry\perl\lib/CPAN/Config.pm: Permission denied