exporter

Do I need Exporter if I'm going for pure OO in Perl?

The docs (Exporter and perlmodlib) say: As a general rule, if the module is trying to be object oriented then export nothing. But then perlmodlib also says: Standard, bundled modules are all expected to behave in a well-defined manner with respect to namespace pollution because they use the Exporter module. So I w...

What's the best way to have two modules which use functions from one another in Perl?

Unfortunately, I'm a totally noob when it comes to creating packages, exporting, etc in Perl. I tried reading some of the modules and often found myself dozing off from the long chapters. It would be helpful if I can find what I need to understand in just one simple webpage without the need to scroll down. :P Basically I have two modul...

How do I export Readonly variables with mod_perl?

I'm trying to make it easier to follow some Perl Best Practices by creating a Constants module that exports several of the scalars used throughout the book. One in particular, $EMPTY_STRING, I can use in just about every Perl script I write. What I'd like is to automatically export these scalars so I can use them without defining them ...

How do I rename an exported function in Perl?

I have some Perl modules which exports various functions. (We haven't used @EXPORT in new modules for some years, but have retained it for compatibility with old scripts.) I have renamed a number of functions and methods to change to a consistent naming policy, and thought that then adding a list of lines like *directory_error = ...

FBX camera export

Does anyone have any sample code regarding setting up FBX cameras? The ViewScene sample code in the SDK seems to do some strange rotation calculation based on the eye point and the target point which is giving me incorrect results. Strangely enough, the cameras I've set up to track other KFbxNode objects is basically working. ...

Moose: Extending Exporter causes constructor to disappear?

Here's something weird that I can't figure out. I have a Moose class that I also want to export some constants, using the age-old standard Exporter module. However, as soon as I add extends Exporter to my class, for some reason, the default Moose constructor no longer gets inherited and I get the fatal error: Can't locate object method ...

How can I share variables between a base class and subclass in Perl?

I have a base class like this: package MyClass; use vars qw/$ME list of vars/; use Exporter; @ISA = qw/Exporter/; @EXPORT_OK = qw/ many variables & functions/; %EXPORT_TAGS = (all => \@EXPORT_OK ); sub my_method { } sub other_methods etc { } --- more code--- I want to subclass MyClass, but only for one method. package MySubclass...

Why can't I call my exported subroutine in my Perl program?

I am new to Perl and I face following issue, having no clue why following is not working. My Perl module contains: package PACK2; use Exporter; @ISA = ('Exporter'); @EXPORT_OK=('whom'); sub why(){ print "why\n"; } sub whom(){ print "whom\n"; } 1; My Perl file contains: #!/usr/bin/perl -w use pack; use pack2 ('whom'); P...

Customizing a script to extract titles from Tumblr post (stripping HMTL tags from text input)

Okay, I' not an expert in PHP (I'm really just beginning to grasp the thing) and I need a little help to customized a script for extracting titles from Tumblr's post (and I insist, it's a small problem, I'm not asking for the whole script to be written for me). For those who doesn't know: Tumblr is a microblogging platform with the ch...