Skip to content

Instantly share code, notes, and snippets.

@nicomen
nicomen / gist:3223904
Created August 1, 2012 05:17
thoughts/questions re p5-mop
just some quick thoughts/questions after reading the docs in the github repo.
1. is it intentional that has mimics our/my using a sigil for the attribute name, rather than be consistent with class/method syntax with no sigil. (I understand it makes partly more sense in one way as that variable is later accessible with a sigil as if it was declared with my/our, but that part is kind of non-logical already, so maybe has foo, still could expose $foo,
1b) or allow attributes be accessed just as special methods that can be lvalues, or moose-like treated as subs all the way. which brings me to
2) aren't attributes now enforced to be scalars?
Should they be objects of the type attribute, or perhaps,
again, be a sub-like entity. Which in turn brings me to
setters/getters/deleters for attributes, which are popular in
012/08/14 12:48:21 [TRACE] .STDOUT Perl.pm:build_make 593> Writing Makefile for Test::TCP
2012/08/14 12:48:21 [TRACE] .STDOUT Perl.pm:build_make 593> Writing MYMETA.yml and MYMETA.json
2012/08/14 12:48:21 [TRACE] .STDOUT Perl.pm:build_make 593> cp lib/Test/TCP/CheckPort.pm blib/lib/Test/TCP/CheckPort.pm
2012/08/14 12:48:21 [TRACE] .STDOUT Perl.pm:build_make 593> cp lib/Test/TCP.pm blib/lib/Test/TCP.pm
2012/08/14 12:48:21 [TRACE] .STDOUT Perl.pm:build_make 593> PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t t/*/*.t t/*/*/*.t t/*/*/*/*.t
2012/08/14 12:48:21 [DEBUG] .STDERR Perl.pm:build_make 593> # Test::More: 0.98
2012/08/14 12:48:21 [TRACE] .STDOUT Perl.pm:build_make 593> t/00_compile.t .............. ok
2012/08/14 12:48:22 [TRACE] .STDOUT Perl.pm:build_make 593> t/01_simple.t ............... ok
2012/08/14 12:48:22 [DEBUG] .STDERR Perl.pm:build_make 593> # your server received SIGABRT
2012/08/14 12:48:22 [TRACE] .STDOUT Perl.pm:b
t/apiv2.333_api_CI_autoprove.t ........................
1..31
ok 1 - use Catalyst::Test;
ok 2 - Schema isa Startsiden::Build::Database::Schema
Could not open file '/meta.yml': Permission denied at /usr/local/share/perl/5.10.1/TAP/Harness/Archive.pm line 335
ok 3 - /api/v2/ci/1/register
ok 4 - /api/v2/ci/1/register JSON content
ok 5 - /api/v2/ci/1/register returned ok
ok 6 - 1029 passing tests
ok 7 - Ci isa Startsiden::Build::Database::Schema::Ci
root@dev-backvis1:/home/nicolasm# perl -MData::Dumper -we 'use Screen9::Client::XMLRPC; print Dumper(Screen9::Client::XMLRPC->new->search({status => "successful", category => "Hvordan" })->result);' | grep categoryname
'categoryname' => 'Hvordan'
'categoryname' => 'Hvordan'
root@dev-backvis1:/home/nicolasm# perl -MData::Dumper -we 'use Screen9::Client::XMLRPC; print Dumper(Screen9::Client::XMLRPC->new->search({status => "successful", categoryname => "Hvordan" })->result);' | grep categoryname
'categoryname' => 'ceal_test'
'categoryname' => 'xstream',
'categoryname' => 'autoFTPUpload',
'categoryname' => 'xstream',
'categoryname' => 'autoFTPUpload',
'categoryname' => 'xstream',
@nicomen
nicomen / check_xml-rpc.pl.diff
Created November 7, 2012 13:34
Changes to allow the check to support structs and match on a dump of the result
--- check_xml-rpc.pl.txt 2004-05-10 15:14:53.000000000 +0200
+++ check_xml-rpc-2.pl.txt 2012-11-07 14:32:32.370505789 +0100
@@ -24,6 +24,7 @@
use strict;
+use Data::Dumper;
use Getopt::Long;
use Frontier::Client;
diff --git a/vendor/bazaar-schema/lib/Bazaar/Schema.pm b/vendor/bazaar-schema/lib/Bazaar/Schema.pm
index e98dd4e..b220f3d 100644
--- a/vendor/bazaar-schema/lib/Bazaar/Schema.pm
+++ b/vendor/bazaar-schema/lib/Bazaar/Schema.pm
@@ -411,6 +411,9 @@ sub prepare_for_testing {
}
);
if ($sqlt_type eq 'SQLite') {
+
+ $dh->schema->storage->dbh->do( 'PRAGMA synchronous = 0' );
[ERROR] ** ElasticSearch::Error::Request at /usr/local/share/perl/5.14.2/ElasticSearch/Transport/HTTPLite.pm line 69 :
11:41 < nicomen> SearchPhaseExecutionException[Failed to execute phase [query], total failure; shardFailures {[qP7iDYE4TwK1rrZvcNPOKA][bazaar][2]: SearchParseException[[bazaar][2]: from[0],size[-1],sort[<custom:"registered":
org.elasticsearch.index.field.data.longs.LongFieldDataType$1@5f896b8d>!]: Parse Failure [Failed to parse source [{"sort":[{"registered":"desc"}],"filter":{"term":{"main_location.name":"Dhaka
City"}},"from":0,"facets":{"main_location_facet":{"terms":{"size":1500,"field":"main_location.name"}},"categories_facet":{"terms":{"size":1500,"field":"category_path"}},"sub_location_facet":{"terms":{"size":1500,"field":"sub_location.name"}},"negotiable_facet":{"filter":{"and":[{"term":{"price_low":0}},{"term":{"price":0}}]}},"price_facet":{"range":{"ranges":[{"to":200000},{"to":500000,"from":200000},{"to":1000000,"from":500000},{"to":1500000,"from":1000000},{"from
(wheezy-root)nicolasm@grumpy:~/projects/cellbazaar-web$ ./script/bazaar-import-test
[Wed Nov 21 11:37:30 2012] [debug] Reading config file "/home/nicolasm/projects/cellbazaar-web/bazaar.conf".
NOTICE: CREATE TABLE will create implicit sequence "dbix_class_deploymenthandler_versions_id_seq" for serial column "dbix_class_deploymenthandler_versions.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "dbix_class_deploymenthandler_versions_pkey" for table "dbix_class_deploymenthandler_versions"
NOTICE: CREATE TABLE / UNIQUE will create implicit index "dbix_class_deploymenthandler_versions_version" for table "dbix_class_deploymenthandler_versions"
DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator::__ANON__(): DBI Exception: DBD::Pg::db do failed: ERROR: function uuid_generate_v4() does not exist
HINT: No function matches the given name and argument types. You might need to add explicit type casts. at /usr/share/perl5/Context/Preserve.pm line 42
(running line 'CREATE TABLE "black_list
diff --git a/Bazaar-Schema/lib/Bazaar/Schema/Result/User.pm b/Bazaar-Schema/lib/Bazaar/Schema/Result/User.pm
index 6c816ed..9704625 100644
--- a/Bazaar-Schema/lib/Bazaar/Schema/Result/User.pm
+++ b/Bazaar-Schema/lib/Bazaar/Schema/Result/User.pm
@@ -78,15 +78,19 @@ has_many favorites => 'Bazaar::Schema::Result::Favorite' =>
many_to_many favorite_items => 'favorites', 'item';
has_many items => 'Bazaar::Schema::Result::Item' =>
- {'foreign.owner_id' => 'self.id'};
-
diff --git a/Bazaar-Admin/bazaar-admin.conf b/Bazaar-Admin/bazaar-admin.conf
index 4d8f64f..2bf56fa 100644
--- a/Bazaar-Admin/bazaar-admin.conf
+++ b/Bazaar-Admin/bazaar-admin.conf
@@ -2,4 +2,23 @@
abuse_mail => 'abuse@cellbazaar.com',
default_lang => 'en',
name => 'Cell Bazaar Administration',
+
+ routes => {