On Wed, 2009-04-15 at 15:35 -0400, Steve Scaffidi wrote:
> Now... I edited a line in that file (MANIFEST.bak)
>
> vim MANIFEST.bak
> git add .
> git-diff --cached --summary -M
>
> Output:
> rename MANIFEST => MANIFEST.bak (99%)
>
> It *still* knows it's a rename!
Git assumes two files are
On Wed, 2009-04-15 at 02:56 -0400, Bill Bogstad wrote:
> The downside is that if an individual developer has a personal
> workflow which generates other temp files, if they add those files to
> .gitignore
> those idiosyncratic changes will eventually be pushed back to the
> 'master' repository.
On Tue, 2009-02-03 at 17:30 -0500, Federico Lucifredi wrote:
> like it is hanging just because it is looking for an ftp client to use
> to download the metadata. Once I fix that, we shall see what the next
> hang is...
Maybe it's not using passive ftp for some reason. Try:
FTP_PASSIVE=1 perl
If you restrict your 'no strict' to a very small block, it's really no
problem at all. Best practice is to apply it to the smallest possible
block possible. This would be even better than what I initially wrote:
foreach ... {
# "setup" code here
{
no strict 'refs';
On Thu, 2008-10-16 at 10:39 -0400, Ronald J Kimball wrote:
> On Thu, Oct 16, 2008 at 08:32:41AM -0600, Palit, Nilanjan wrote:
>
> > Perl complains about the second line in the foreach loop during run time:
> > Can't use string ("abc_type") as a SCALAR ref while "strict refs" in use at
> >
One kind of nasty option is to use string eval:
$varname = "\$${_}_type";
eval "$varname = ";
There are technical caveats and perhaps moral issues with this approach,
but it works.
-- Jeremy
On Thu, 2008-10-16 at 08:32 -0600, Palit, Nilanjan wrote:
> How (or can) I use an interpolated
On Tue, 2008-07-15 at 14:23 -0400, Steve Scaffidi wrote:
> I propose that ack should have a mascot:
> http://www.flickr.com/photos/[EMAIL PROTECTED]/881400078/
$ ack --thpppt
_ /|
\'o.O'
=(___)=
Uack --thpppt!
___
Boston-pm mailing list
utf-8 *is* unicode... Are you trying to convert a non-utf-8 document
into utf-8 and retain all of the "special" quote characters, or do you
just want to strip out any non-ascii characters entirely?
-- Jeremy
On Wed, 2007-12-05 at 14:21 -0500, Alex Brelsfoard wrote:
> Hi All,
> I am currently
On Fri, 2007-08-24 at 19:32 -0400, Alex Brelsfoard wrote:
> sub main {
> my $catalog_timestamp;
...
> sub get_catalog_timestamp {
...
> $catalog_timestamp = $elt->att('PublishTimestamp');
> "Global symbol "$catalog_timestamp" requires explicit package name"
Yep. You can get away
David Cantrell wrote:
> xterms, search.cpan.org, and an editor are all the IDE I need*.
> They're all I *want*.
Charlton Wilbur wrote:
> This is all true, but I'd say, rather than condemning IDEs, that the
> quality of the end result is independent of the quality of the tools,
> but the
On Thu, 2006-09-21 at 08:08 -0400, Bill Ricker wrote:
> > > Note : This 0..$#array would have been INefficient for big array back
> > > before for(0..$N) was optimized with a lazy list.
>
> > When exactly did that happen?
>
> Long enough ago that if you find a Perl on which
>perl -le "
On Wed, 2006-06-21 at 13:59 -0400, Ricker, William wrote:
> LIMITS -- As near as Google can tell, the limit on 32bit is 2GB for
> filesystem (signed numbers! Fie!), 4GB for process memory (unsigned,
> yeah!).
> http://www.google.com/search?hl=en==Perl+32-bit+2-GB+OR+4-GB+x86
On x86 hardware the
On Mon, 2006-04-03 at 14:02 -0400, Tolkin, Steve wrote:
> I am looking for the "best" and/or original wording of this programming
> maxim: Put similarities in code and differences in data
"data-driven programming" ?
-- Jeremy
___
Boston-pm mailing
On Tue, 2006-02-21 at 11:38 -0800, Ranga Nathan wrote:
> I will have to re-start the script after every log rotation! I wish I
> could do this programmatically. Perhaps another script to monitor the log
> file and notice the sudden change in size or inode.
This is from the man page for tail:
I think he meant a web-based editor for human input/editing of XML
files. A quick search on Sourceforge provides this project:
http://xmlwebgui.sourceforge.net/
-- Jeremy
On Wed, 2006-01-25 at 09:31 -0500, Ian Langworth wrote:
> When I was building a REST interface that spoke XML, I found
On Thu, 2006-01-19 at 22:25 -0500, Bob Rogers wrote:
>Frequently I need to execute certain portions of the code (e.g that
>creates files / directories) with the user's permission. I am not sure
>how to do this in perl. Currently I am doing something like:
>
> I've never needed this
On Thu, 2006-01-12 at 09:42 -0500, Charlie Reitzel wrote:
> Doing a "View | Source ...", it looks like they are using a CMS product
> called "Labyrinth".
Labyrinth appears to be something Barbie wrote himself.
-- Jeremy
___
Boston-pm mailing
On Tue, 2005-12-20 at 23:42 -0500, Uri Guttman wrote:
> FL> my @commands = ( '/bin/netstat -ape | /usr/bin/wc -l',
> FL> '/usr/bin/lsof | wc -l',
> FL> '/bin/ps ax -L | wc -l' );
>
> FL> my @triggers = qw( 0 0 0);
>
> since @triggers must be the same
Upon encountering unexpected behavior, the best plan is almost always to
produce a minimal amount of real working code that reproduces the
behavior. Instead of a "generic breakdown", write some actual code that
we can run and examine and instrument. Make sure to produce a well-
defined success
On Tue, 2005-12-06 at 20:45 -0500, John Abreau wrote:
> Of course, getting to the site is a problem; it looks like Network
> Solutions is screwing them over. From WHOIS:
...
> Looks like the guy tried to switch registrars, and NetSol is punishing
> him for it.
No, his DNS servers are just
On Wed, 2005-11-30 at 02:16 -0500, Aaron Sherman wrote:
> Ronald J Kimball wrote:
>
> >my @indices = (0) x $maxlen;
> >
> >
> I have no idea why, because it's not more efficent or anything, but I
> always find myself writing:
>
> my @indices = map { 0 } 1..$maxlen;
I believe the latter is
XML::Writer gives you total control over the output, but you do need to
write a little more code than you would with XML::Simple.
-- Jeremy
On Thu, 2005-10-20 at 08:47 -0700, Niraikalai Vijay wrote:
> I am using XML::Simple to generate XML file for a data
> file.
>
> As XMLout uses hash
On Wed, 2005-10-19 at 12:42 -0400, Dan Boger wrote:
> > What are you passing to the offending search_where() call in
> > Peeron2/Sets.pm?
>
> Just a single search param:
>
> my @res = Peeron2::Sets->search_where(ID => $setid);
Is 'id' the primary key of the table? If so, you should be using
On Wed, 2005-10-19 at 09:55 -0400, Dan Boger wrote:
> Peeron2::Sets can't SELECT id, id, setnumber, setrev, name, theme, year,
> pcs, figs, picture, msrp, instructions, inventory
> FROM SETS
> WHERE ( ID = ? )
> : Not an ARRAY reference at /usr/home/peeron/lib/modules/Class/DBI.pm line
Uri Guttman wrote:
> you don't even need children to do non-blocking rpc calls. if you do the
> protocol yourself and it is over a socket (as it should be), you can do
> async rpc calls.
The protocol is my own and it can do async calls. However I do in fact
also use DBI. Otherwise I would
On Thu, 2005-10-06 at 18:36 -0400, Uri Guttman wrote:
> even the people who wrote the threads code in perl disavow them, so i
> wouldn't even try to do any heavy threading in perl. instead i recommend
> an event loop server which is stable, faster and easier to code for in
> most situations. you
Has anyone here written a serious threaded server in perl? I can't seem
to find any threads + sockets examples anywhere. I have some stuff
working with Thread::Pool but there are problems. (I can elaborate if
anyone wants me to...)
-- Jeremy
___
How about the unix "find" command, with the -printf option? You can get
it through cygwin. Taking find's output (even without -printf) from two
directories and diffing it has gotten me through most of these sorts of
problems.
Also, diff -r might be helpful. (possibly with the --brief option as
Ronald J Kimball wrote:
> Phil then led an open discussion on the implementation of Reef, touching on
> topics such as content caching, GIS, database schemas, and keyword
> categories.
Phil, I just remembered Trac: http://www.edgewall.com/trac/
Trac is a lightweight wiki-based project
On Fri, 2005-07-15 at 13:39 -0400, Chris Brooks wrote:
> $xml =~ s/chr(145)/'/g;
> $xml =~ s/chr(146)/'/g;
> $xml =~ s/chr(147)/"/g;
> $xml =~ s/chr(148)/"/g;
You can use \xNN to mean "the character with hex ascii code NN". Here's
some code to do exactly what you want:
cambridge.pm looks pretty defunct, based on their website...
Maps to E51:
http://whereis.mit.edu/map-jpg?selection=E51
http://maps.google.com/maps?q=70+memorial+dr,+cambridge,+ma=en
-- Jeremy
On Fri, 2005-07-08 at 16:11 -0400, Chris Devers wrote:
> Waitaminute, if we're going to meet at
The June 2004 issue of TPJ had an article titled "Controlling Internet
Explorer Using Win32::OLE" which details the exact approach you're
taking. Here's the relevant code:
use Win32::OLE;
my $explorer = new Win32::OLE(`InternetExplorer.Application')
or die "Unable to
# use 'n' instead of 'S' to support big- AND little-endian systems
# thanks to posts on perlmonks for hints!
sub custom_pack {
unpack 'n', pack 'B16', sprintf '%02b%06b%03b%05b', @_;
}
sub custom_unpack {
map oct "0b$_", unpack 'a2a6a3a5', unpack 'B16', pack 'n', @_;
}
print sprintf('%X',
On Wed, 2004-09-08 at 15:43, Chris Devers wrote:
> Looking back at my /usr/share/dict/words, the singular
> form of the word doesn't show up
I find that kind of hard to believe... What unix are you running?
Anyway, here's my submission (I initially envisioned some xargs/grep
stuff at the end
On Tue, 2004-07-27 at 12:54, Daniel Allen wrote:
> LINE: while (defined($_ = )) {
> /(\d+)/;
> print "$1 ";
> }
> continue {
> #print $_;
> }
The continue interposes another block into the loop. According to
perlre as quoted by Steve below, $1 et al. are scoped until the end of
the
The use of the colon (:) in these 2 contexts is not at all related!
1) Package delimiter - ::
:: is THE delimiter for package scoping, as defined by Perl's official
syntax. LWP::Simple refers to a package Simple which is contained
within the LWP package. This is expressed at the filesystem
Aside from the various guesses at how to push data onto the SOURCEFIELD
array (only Gyepi and Jeffrey have it right :) I advise you to look at
XML::Writer for XML output, instead of XML::Simple. XML::Simple might
be good for a first pass at generating output, but you'll almost
certainly come to
Install the redhat-config-xfree86 package (get it at rpmfind.net if you
don't have the CDs handy). Once that's installed, in your dock's RedHat
menu, go to "System Settings" -> "Display", or just run
redhat-config-xfree86 from a terminal.
-- Jeremy
On Wed, 2004-03-03 at 17:26, Ranga Nathan
On Thu, 2004-02-12 at 19:24, J. Wren Hunt wrote:
> Or you might try Compress::Zlib (file-based).
Compress::Zlib is actually NOT file based. It operates on scalars in
memory.
Oh, and Sean, have a look at bioperl before you get too deep in your
project: http://bioperl.org/
-- Jeremy
On Mon, 2004-02-02 at 12:03, [EMAIL PROTECTED] wrote:
> I'm trying to do a cvs command in perl using the system command.
> I'd like to capture the output. and I don't want cvs stuff barfing
> on the screen.
cvs dumps a lot of stuff on stderr. Tack 2>&1 on the end of your
backtick call to
Ranga Nathan wrote:
$main_sock = new IO::Socket::INET (
LocalHost =>'208.179.25.28',
Localport => ,
Listen => 3,
Proto => 'tcp',
Reuse => 1,
);
LocalPort, not Localport (capital P).
On Tue, 2004-01-27 at 17:41, Tolkin, Steve wrote:
> In principle quite complex code can be analyzed
> to determine accurately that the data is not modified.
What if the variable in question is actually tied, and a "read"
operation on the variable actually modifies the value? In certain other
Well you can't even assign a scalar to an @array to preallocate size,
the way you can assign to $#array. @array = 8 always creates an array
with a single element, namely 8. So I am pretty sure you're screwed
trying to make perl do what you want. Maybe you couldjust *read* the
scalar value via
On Wed, 2004-01-07 at 14:29, John Tobey wrote:
> On Wed, Jan 07, 2004 at 12:53:55PM -0500, Jeremy Muhlich wrote:
> > 3) Make errors non-fatal with $dbh->{RaiseError} = 0
>
> I don't know why you suggest making errors non-fatal.
What I meant was, "IF you want to mak
On Wed, 2004-01-07 at 12:37, [EMAIL PROTECTED] wrote:
> The following block was identified by the error message:
>
> foreach my $exp_id (values %experiments) {
>eval {
> my $q_delete_old_data = qq{DELETE DATA_TM
> WHERE EXP_ID = $exp_id};
> my
On Wed, 2004-01-07 at 11:49, [EMAIL PROTECTED] wrote:
> I've beem frustrated by the following error message when I run a script
> on an Oracle database:
>
> 'DBD::Oracle::st execute failed: ORA-01000: maximum open cursors exceeded
> (DBD ERROR: OCIStmtExecute) [for statement "DELETE DATA_TM
No need to use LWP. You can call CPAN directly:
use CPAN;
CPAN::install("Some::Module");
But why stop at writing a standalone script? How about a Devel:: module
that watches for a failed require() call, installs the missing module,
and continues? :)
-- Jeremy
On Mon, 2003-11-24 at
You can force any cpan command by prepending it with 'force' (type
'help' at the cpan prompt for a list of commands).
cpan> force install Module
-- Jeremy
On Wed, 2003-11-19 at 12:27, Ranga Nathan wrote:
> CPAN module is cool! Dont know why I did not use it earlier!
> However I have one
On Fri, 2003-09-26 at 12:25, Jeremy Muhlich wrote:
> On Fri, 2003-09-26 at 11:48, Ron Newman wrote:
> > my $r2 = qr/this/x;
>
> I can't think of any way to override that from "outside" those parens.
Well, you *could* do:
lc($s) =~ $r2
but I figure that't not r
On Fri, 2003-09-26 at 11:48, Ron Newman wrote:
> my $r2 = qr/this/x;
If you print out $r2, you'll see:
(?x-ism:this)
So perl is applying the /x modifier by setting the x flag and unsetting
the ism flags in a group that encompasses the entire pattern. I can't
think of any way to override that
Quick google search reveals that cl.exe is the Visual C++ compiler.
-- Jeremy
On Fri, 2003-09-05 at 11:55, Joel Gwynn wrote:
> I'm trying to install IO::TTY on windows. I downloaded the package from
> cpan, and when I run the makefile, I get "Cannot run the configured
> compiler cl"
>
>
On Tue, 2003-04-01 at 12:28, Pease, Kevin wrote:
> Front slashes as directory separators should work on Windows too (at
> least, they do for me on WinXP). Windows should accept front or back
> slashes, Unix should accept only front slashes... so using front-slashes on
> any platform as your
On Fri, 2003-01-17 at 13:45, John Saylor wrote:
> I have a project where I am trying to dump all the variable names and
> values in a given package namespace. I can get all the variable names
> OK, it's just getting the values from those names that I am not able to
> do.
Check out the Dumpvalue
53 matches
Mail list logo