Hello world!
My first post here, so hope not be blamed. First, introduce that I like to call my module in this way :
use myRoboFolks;
eval {
hey myRoboFolks -> provided(%argv) -> please("do something");
};
Sorry if $@;
# hey() is the constructor alias to new() for real
# Sorry is an exported sub which extends die() by
# $SIG{__DIE__} capture
Question:
Can I do something to make "With" alias to use()? So I can write
With myRoboFolks;
eval {...}
Plus, if there's such a way, can it apply to other perlfuncs ?
My current approach is to use eval{require()} at the BEGIN block, because 'require' looks better than 'use' but I think I better reserve the BEGIN block more clear for some init processes. And this approach actually looks bulky.
So... I am not a professional programmer, and I just want to write codes in the style un-dull, for my very own long boring projects. So please don't blame me on the style manner, I really need some fun with the codes...
Any clues would be much appreciate! Thanks a lot!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.