--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perl/gplugin-perl-defs.h Tue Oct 06 23:20:05 2015 -0500
@@ -0,0 +1,49 @@
+ * Copyright (C) 2011-2015 Gary Kramlich <grim@reaperworld.com> + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * This library 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 + * Lesser General Public License for more details. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. +#ifndef GPLUGIN_PERL_DEFS_H +#define GPLUGIN_PERL_DEFS_H +const gchar gplugin_perl_definitions[] = { + "package GPlugin::Loader;" + "sub gplugin_load_file {" + "my $filename = shift;" + "open FH, $filename or return \"__FAILED__\";" + "sub gplugin_destroy_package {" + "if $_[0]->can('UNLOAD') {" + "Symbol::delete_package($_[0]);" +#endif /* GPLUGIN_PERL_DEFS_H */ --- a/perl/gplugin-perl-loader.c Mon Jun 29 22:05:39 2015 -0500
+++ b/perl/gplugin-perl-loader.c Tue Oct 06 23:20:05 2015 -0500
@@ -54,19 +54,18 @@
PERL_SET_CONTEXT(interp);
- call_pv(sub, G_SCALAR);
+ call_pv("gplugin_query", G_SCALAR); - g_warning("sinfo: %p", sinfo);
/******************************************************************************
@@ -90,18 +89,31 @@
g_message("filename: %s", filename);
+ PERL_SET_CONTEXT(interp); - PERL_SET_CONTEXT(interp);
+ *error = g_error_new(GPLUGIN_DOMAIN, 0, "failed to create a perl interperter"); PL_perl_destruct_level = 1; /* perl_construct resets this to 0 */
PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
- ret = perl_parse(interp, gplugin_perl_loader_xsinit, argc, argv, NULL);
+ ret = perl_parse(interp, gplugin_perl_loader_xsinit, argc, args, NULL); + g_message("ret: %d", ret); const gchar *msg = "unknown";
+ g_message("got the warning"); msg = SvPVutf8_nolen(ERRSV);
+ g_message("no warning"); *error = g_error_new(GPLUGIN_DOMAIN, 0,
@@ -116,6 +128,8 @@
info = gplugin_perl_query(interp);
+ g_message("info: %p", info); --- a/perl/tests/plugins/basic.pl Mon Jun 29 22:05:39 2015 -0500
+++ b/perl/tests/plugins/basic.pl Tue Oct 06 23:20:05 2015 -0500
@@ -14,12 +14,14 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, see <http://www.gnu.org/licenses/>.
use Glib::Object::Introspection;
Glib::Object::Introspection->setup(basename => "GPlugin", version => "0.0", package=> "GPlugin");
return GPlugin::PluginInfo->new(
id => "gplugin/perl-basic-plugin",